Choosing Where Fields Appear (Location Rules) | Field Forge - Custom Fields, Built for Speed
Download Log in

Choosing Where Fields Appear (Location Rules)

User Guide

Location rules are the instructions that tell Field Forge which posts, pages, or admin screens should display a particular field group. Without a location rule, your field group exists in the database but never shows up when editing content. Getting location rules right is essential — they are the bridge between “I built these fields” and “editors can actually use them.”

This section covers everything from the simplest single-condition rule to complex multi-condition setups, with real-world scenarios for each pattern.

How Location Rules Work

Every location rule is a condition made up of three parts:

  1. Parameter — What you are testing. Examples: Post Type, Page Template, Category, User Role.
  2. Operator — How you are comparing. Usually “is equal to” or “is not equal to.”
  3. Value — The specific value to match. Examples: Page, Post, Full Width template, News category.

When a content manager opens a post in the editor, Field Forge evaluates all field groups and checks their location rules against the current post. If a field group’s rules match, its metabox appears. If they do not match, it stays hidden.

Simple Rules — One Condition

The most common setup is a single condition. Here are the patterns you will use most often:

What You WantParameterOperatorValue
Show on all PagesPost Typeis equal toPage
Show on all Blog PostsPost Typeis equal toPost
Show on all ProductsPost Typeis equal toProduct
Show only on the homepagePage Typeis equal toFront Page
Show only on one specific pagePageis equal toAbout Us

To set a simple rule:

  1. Open your field group and scroll down to the Location Rules section
  2. Click the first dropdown and select your parameter (e.g., “Post Type”)
  3. The operator defaults to “is equal to” — leave it unless you need “is not equal to”
  4. Select the value from the third dropdown (e.g., “Page”)
  5. Save the field group

Combining Conditions with AND (All Must Be True)

When you need multiple conditions to be true at the same time, add them within the same rule group. All conditions in a single group use AND logic — every condition must match for the fields to appear.

Scenario: You want a “Landing Page Hero” field group to appear only on Pages that use the “Landing Page” template. Regular pages with the Default template should not show these fields.
  1. Open the field group, scroll to Location Rules
  2. Set the first condition: Post Type is equal to Page
  3. Click the Add Rule button (this adds another condition to the same group)
  4. Set the second condition: Page Template is equal to Landing Page
  5. Save

Now both conditions must be true. A post that is a Page but uses the Default template will not see the fields. A Blog Post using any template will not see them either.

Creating Alternatives with OR (Any Group Can Match)

When you want fields to appear in multiple different situations, create separate rule groups. Each group is an independent alternative — if any group’s conditions are satisfied, the fields appear.

Scenario: You want a “Sidebar Content” field group to appear on Blog Posts in the News category, and also on all Pages that use the Full Width template.
  1. Open the field group, scroll to Location Rules
  2. In the first group: Post Type is equal to Post, then Add Rule: Category is equal to News
  3. Click Add Rule Group (this creates a new OR group below)
  4. In the second group: Post Type is equal to Page, then Add Rule: Page Template is equal to Full Width
  5. Save

The result: fields appear on Posts in the News category (Group 1 matches), OR on Pages with the Full Width template (Group 2 matches). A Post in the Tutorials category would not match. A Page with the Default template would not match.

Step-by-Step: Setting Up a Complex Real-World Rule

Scenario: Imagine you manage a university website. You want a “Course Details” field group to appear on:
  • All “Course” post types (always)
  • “Page” post types, but only when the template is “Department Page”
  • But never for users with the “Subscriber” role (they should not edit course details)

Here is how to build it:

  1. Open your “Course Details” field group
  2. In the first rule group, set: Post Type is equal to Course
  3. Click Add Rule Group to create an OR alternative
  4. In the second group, set: Post Type is equal to Page
  5. Within the same second group, click Add Rule and set: Page Template is equal to Department Page
  6. Now click Add Rule Group one more time for a third group — wait, actually the user role exclusion works differently. You add it as an AND condition to each existing group, or you use the “is not equal to” operator
  7. In the first group, click Add Rule and set: User Role is not equal to Subscriber
  8. In the second group, click Add Rule and set: User Role is not equal to Subscriber
  9. Save

Now the fields appear on Course posts for non-Subscribers, and on Department Page templates for non-Subscribers.

All Available Location Conditions

ConditionExamplesWhen to Use It
Post TypePost, Page, Product, Event, Team MemberMost common — target a specific content type
Page TemplateDefault, Full Width, Landing Page, SidebarWhen only certain templates need the fields
Post StatusPublished, Draft, Pending ReviewRarely used — typically for admin workflow triggers
Post FormatStandard, Video, Gallery, QuoteWhen different post formats need different fields
CategoryNews, Blog, Tutorials, RecipesTarget posts in a specific category
TaxonomyAny custom taxonomy termFor custom classification systems beyond categories
Specific PageAbout Us, Contact, Home, PricingWhen exactly one page needs the fields
Page TypeFront Page, Posts Page, Top Level, Child PageFor structural page positions in the hierarchy
Parent PageAny specific pageFor child pages under a particular parent
User RoleAdministrator, Editor, Author, ContributorShow fields only to certain user roles
Options PageSite Settings, Theme Options (PRO)For targeting options page screens

Negation Rules — Excluding Content

Sometimes it is easier to say “show everywhere except…” than to list every place the fields should appear. Use the “is not equal to” operator for exclusions.

Examples:
  • Show on all post types except Pages: Post Type is not equal to Page
  • Show on all pages except the homepage: Page is not equal to Home
  • Show for all users except Subscribers: User Role is not equal to Subscriber

Common Location Rule Patterns at a Glance

ScenarioSetup
All products in the shopPost Type = Product
Only the homepagePage Type = Front Page
Blog posts in multiple categoriesCategory = News (Group 1) OR Category = Blog (Group 2)
Everything except pagesPost Type is not equal to Page
One specific landing pagePage = “Summer Sale 2026”
Pages using two different templatesPage Template = Landing Page (Group 1) OR Page Template = Full Width (Group 2)
Posts that an Editor role can seePost Type = Post AND User Role = Editor

> Tip: If your fields are not appearing on a post, the first thing to check is always the location rules. Open the field group, scroll to Location Rules, and verify that the conditions match the post you are editing. This solves the problem 90% of the time.

> Common mistake: Confusing AND and OR logic. Adding a second condition inside the same group means AND (both must match). Adding a new rule group means OR (either can match). If your fields appear on too many posts, you probably used OR when you meant AND. If they appear on too few posts, you probably used AND when you meant OR.

Forge AI Assistant Online

Hi! I'm the Field Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs