Skip to content

Show Custom Fields on Specific Page Templates in WordPress

Key Takeaways

  • Location Rules set to Page Template make a field group appear only on the selected template, so the layout gets the extra fields and nothing else.
  • Set the operator to Equals and choose the template, then click Update and open a page using that template to confirm the group appears.
  • Block themes expose templates differently from classic themes, and a page has to be saved with the template before the group appears.
Table of Contents

Sometimes a field group belongs to a layout rather than a post type — the extra fields a landing-page template needs, and nothing else.

What It Does

A Page Template rule matches the template selected on the page, so the group appears only where that layout is in use.

Before You Start

  • At least one page template in your theme or block theme.
  • A field group to attach.

Target a Template

  1. Open the field group and find Location Rules.
The Location Rules panel, where the Page Template rule is set
  1. Set the parameter to Page Template.
  1. Set the operator to Equals.
  1. Choose the template.
  1. Click Update, then open a page using that template to confirm.

When to Use It

  • Hero fields on a landing-page template only.
  • Sidebar overrides on a template that has a sidebar.
  • Fields for a template that renders a custom layout.

Limitations

  • The rule matches the template assigned to the page, so a page has to be saved with that template before the group appears.
  • Block themes expose templates differently from classic themes. If a template is missing from the list, check it is registered and selectable on the page itself.

Troubleshooting

The group does not appear on a new page

The template is not assigned yet. Choose it, save the page, and the group appears.

My template is not in the dropdown

It is not being offered by the theme as a selectable page template. Confirm it appears in the page’s own Template control first.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

Why isn’t my custom field group showing on a new page template page?

The usual cause is that the page has not been saved with that template yet. A Page Template rule matches the template selected on the page, so the field group only appears after the page is assigned that template and saved. In Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter this matters because the rule is tied to the page’s actual template state, not just the layout name.

How do I show custom fields only on one WordPress page template?

Use a Location Rules match for Page Template and set the operator to Equals, then choose the template you want. That makes the field group appear only when that layout is in use. The practical win is keeping landing-page fields out of unrelated pages, which avoids clutter and reduces accidental data entry on pages that do not use that design.

What kind of pages should use a Page Template rule for custom fields?

Page Template rules fit cases where the fields belong to a layout instead of a post type. The page gives three clear examples: hero fields on a landing-page template, sidebar overrides on a template with a sidebar, and fields for a template that renders a custom layout. That makes this rule better than broad post-type targeting when the design itself drives what data is needed.

Why is my WordPress template missing from the custom fields dropdown?

A missing template usually means the theme is not offering it as a selectable page template. The page says block themes expose templates differently from classic themes, so first confirm the template appears in the page’s own Template control. If it is not selectable there, it will not show up in Location Rules either.

What are the limits of showing custom fields by page template in WordPress?

The main limit is timing: the rule only matches after the page has been saved with that template. Another gotcha is theme behavior, because block themes expose templates differently from classic themes. If a template does not appear in the list, it needs to be registered and selectable on the page itself before Location Rules can target it.

Where can I learn more about location rules and field groups in WordPress?

The related docs point to three useful references: Location rules overview, Show fields on specific post types, and Create a field group in WordPress. Those cover how location targeting works, when post-type targeting makes more sense, and how to create the field group before assigning rules.

Last reviewed: November 12, 2026

Related Docs