Support Log in

Recipe: Setting Up Site-Wide Settings with Options Pages

User Guide
Prefer video? Watch the Field Forge tutorials 8 short guides covering every feature Watch

Options Pages are dedicated admin screens for managing data that is not tied to any single post or page — company contact info, social media links, footer text, global toggles, and more. This recipe walks through the complete setup.

Step 1: Decide How the Options Page Will Be Registered

Field Forge supports three registration paths — pick whichever fits the workflow:

  1. Admin UI (recommended, no code) — go to Field Forge > Options Pages, click Add New Options Page, fill in Page Title, Menu Slug, Capability, Parent Page, Icon, Position. Save. The menu item appears in the WordPress admin sidebar immediately. You can edit, soft-delete, or restore the page from the same list. The page row lives in the wp_fieldforge_options_pages table.
  2. Auto-register from a field group (simplest one-step option) — give the field group an Options Page location rule and Field Forge creates a menu item with the group’s title as the menu label. No code, no separate page registration. The page is read-only in the Options Pages list — change the field group’s title to rename the menu item.
  3. Register explicitly via PHP (when the registration should ship with the theme) — drop a snippet into your theme’s functions.php:
php
add_action('init', function () {
    if (function_exists('fieldforge_add_options_page')) {
        fieldforge_add_options_page([
            'page_title' => 'Site Settings',
            'menu_title' => 'Site Settings',
            'menu_slug'  => 'site-settings',  // matches the location rule below
            'icon_url'   => 'dashicons-admin-settings',
            'capability' => 'manage_options',
            'position'   => 80,
        ]);
    }
});

The acf_add_options_page() shim is also available for theme code migrating from ACF Pro.

Step 2: Add Field Groups

Create one or more field groups that target the Options Page. The options page draws one box for each field group, headed with the group title, and shows each field as its label and an input. Tab, Accordion and Message fields are not shown there, and the page does not use a field’s Instructions, Placeholder, Default, Required or Conditional Logic settings, so the tables below set only what the page uses (Rows for the Address field).

Field Group: Company Information
  1. Go to Field Forge > Field Groups and click New Field Group, title it Company Information (the title becomes the heading of its box on the options page)
  2. Add these fields:
FieldTypeSettings
Company NameTextNone
TaglineTextNone
LogoImageNone
FaviconImageNone
Phone NumberTextNone
Email AddressEmailNone
AddressTextareaRows: 3
  1. Set Location Rules: Options Page is equal to Site Settings
  2. Save the field group
Field Group: Social Media
  1. Go to Field Forge > Field Groups and click New Field Group, title it Social Media
  2. Add these fields:
FieldTypeSettings
FacebookURLNone
Twitter / XURLNone
InstagramURLNone
LinkedInURLNone
YouTubeURLNone
  1. Set Location Rules: Options Page is equal to Site Settings
  2. Save the field group
Field Group: Footer
  1. Go to Field Forge > Field Groups and click New Field Group, title it Footer
  2. Add these fields:
FieldTypeSettings
Copyright TextTextNone
Footer LogoImageNone
Show Newsletter SignupTrue/FalseNone
Newsletter HeadingTextNone
Newsletter SubtextTextNone
  1. Set Location Rules: Options Page is equal to Site Settings
  2. Save the field group

Step 3: Content Manager Workflow

  1. Click Site Settings in the admin sidebar
  2. You see one box for each field group, headed with the group title: Company Information, Social Media and Footer
  3. Fill in the company name, upload the logo, and enter contact details in the Company Information box
  4. Paste your social profile URLs in the Social Media box
  5. Customize the copyright text and newsletter settings in the Footer box
  6. Click Save Options (the button is at the bottom of the page)

Changes apply site-wide immediately. Every page on the site that uses these values will update automatically.

Step 4: Using Options Data in Templates

Your developer accesses options data using the 'options' parameter:

  • get_field('company_name', 'options') in the header
  • get_field('social_facebook', 'options') for social icons
  • get_field('copyright_text', 'options') in the footer

Organizing with Sub-Pages

For complex sites, create sub-pages under the main options page:

  • Site Settings (parent)
– General — company info, logo, contact

– Social Media — all social profile links

– Appearance — colors, fonts, layout preferences

– Integrations — Google Analytics ID, chat widget code, third-party scripts

Each sub-page gets its own field group. This keeps each settings screen focused and easy to navigate.

Tips for Options Pages

  • Use one field group per section to organize related fields: each group gets its own box with its title as the heading, so you do not need a separate sub-page for every category
  • Plan for empty valuesa field that has not been saved yet shows an empty input, because the options page does not apply default values, so give your template code a fallback for anything the site needs
  • Put guidance in the label, for example “Logo (transparent PNG, 300×100 pixels)”: an options page shows only the label and the input, not Instructions or Message fields
  • Do not rely on Conditional Logic here: an options page does not apply it, so every field in a group is always shown
  • Keep it simpleonly put data here that truly needs to be site-wide. Per-page data belongs in regular field groups attached to specific posts or pages

—

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