Skip to content
Ultivo Toolkit 1.0 is here! Get 10% off your first year with LAUNCH10 until September 30. See pricing
Documentation menu

Location rules

How rules work#

Every field group has a Location box with one or more rule groups. Each rule is a param – operator – value triple, with is equal to and is not equal to as operators.

  • Rules inside a group are combined with AND: all of them must match.
  • Rule groups are combined with OR: the field group appears as soon as any single group matches.

That combination covers most targeting: use AND to narrow ("pages with this template"), and add an OR group to widen ("...or this specific post").

Available rules#

  • Post type: any registered post type, including your own.
  • Post / Page: one specific post or page.
  • Post template / Page template: the assigned template file, with default for posts and pages without one.
  • Post category / Post taxonomy: the post has a given category or taxonomy term.
  • Page type: front page, posts page, top-level page, or child page.
  • Taxonomy term: show the group on a taxonomy's term-edit screens (a specific taxonomy, or All).
  • User form / User role: show the group on user profile screens, optionally filtered by role.
  • Options page: attach the group to an options page.
  • Block: attach the group to a registered block, so the fields become the block's editable attributes.

Developers can add custom location params through the ultivo/location/rule_match filter.

Examples#

A landing-page hero group, only on pages that use the Landing template:

Post type is equal to Page AND Page template is equal to Landing

Site-wide settings on an options page, plus the same fields on one specific page:

Options page is equal to Theme Settings OR Page is equal to Home

Everything except a single post type:

Post type is not equal to Attachment