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:
- Parameter — What you are testing. Examples: Post Type, Page Template, Category, User Role.
- Operator — How you are comparing. Usually “is equal to” or “is not equal to.”
- 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 Want | Parameter | Operator | Value |
|---|---|---|---|
| Show on all Pages | Post Type | is equal to | Page |
| Show on all Blog Posts | Post Type | is equal to | Post |
| Show on all Products | Post Type | is equal to | Product |
| Show only on the homepage | Page Type | is equal to | Front Page |
| Show only on one specific page | Page | is equal to | About Us |
To set a simple rule:
- Open your field group and scroll down to the Location Rules section
- Click the first dropdown and select your parameter (e.g., “Post Type”)
- The operator defaults to “is equal to” — leave it unless you need “is not equal to”
- Select the value from the third dropdown (e.g., “Page”)
- 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.- Open the field group, scroll to Location Rules
- Set the first condition: Post Type is equal to Page
- Click the Add Rule button (this adds another condition to the same group)
- Set the second condition: Page Template is equal to Landing Page
- 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.- Open the field group, scroll to Location Rules
- In the first group: Post Type is equal to Post, then Add Rule: Category is equal to News
- Click Add Rule Group (this creates a new OR group below)
- In the second group: Post Type is equal to Page, then Add Rule: Page Template is equal to Full Width
- 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:
- Open your “Course Details” field group
- In the first rule group, set: Post Type is equal to Course
- Click Add Rule Group to create an OR alternative
- In the second group, set: Post Type is equal to Page
- Within the same second group, click Add Rule and set: Page Template is equal to Department Page
- 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
- In the first group, click Add Rule and set: User Role is not equal to Subscriber
- In the second group, click Add Rule and set: User Role is not equal to Subscriber
- Save
Now the fields appear on Course posts for non-Subscribers, and on Department Page templates for non-Subscribers.
All Available Location Conditions
| Condition | Examples | When to Use It |
|---|---|---|
| Post Type | Post, Page, Product, Event, Team Member | Most common — target a specific content type |
| Page Template | Default, Full Width, Landing Page, Sidebar | When only certain templates need the fields |
| Post Status | Published, Draft, Pending Review | Rarely used — typically for admin workflow triggers |
| Post Format | Standard, Video, Gallery, Quote | When different post formats need different fields |
| Category | News, Blog, Tutorials, Recipes | Target posts in a specific category |
| Taxonomy | Any custom taxonomy term | For custom classification systems beyond categories |
| Specific Page | About Us, Contact, Home, Pricing | When exactly one page needs the fields |
| Page Type | Front Page, Posts Page, Top Level, Child Page | For structural page positions in the hierarchy |
| Parent Page | Any specific page | For child pages under a particular parent |
| User Role | Administrator, Editor, Author, Contributor | Show fields only to certain user roles |
| Options Page | Site 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
| Scenario | Setup |
|---|---|
| All products in the shop | Post Type = Product |
| Only the homepage | Page Type = Front Page |
| Blog posts in multiple categories | Category = News (Group 1) OR Category = Blog (Group 2) |
| Everything except pages | Post Type is not equal to Page |
| One specific landing page | Page = “Summer Sale 2026” |
| Pages using two different templates | Page Template = Landing Page (Group 1) OR Page Template = Full Width (Group 2) |
| Posts that an Editor role can see | Post 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.
—