Recipe: Setting Up Site-Wide Settings with Options Pages | Field Forge - Custom Fields, Built for Speed
Download Log in

Recipe: Setting Up Site-Wide Settings with Options Pages

User Guide

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 auto-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.

Field Group: Company Information
  1. Go to Field Forge > New Field Group, title it Company Information
  2. Add a Tab field labeled General
  3. Add these fields:
FieldTypeSettings
Company NameTextRequired: Yes
TaglineTextPlaceholder: “Your company motto”
LogoImageReturn Format: Image Array, Instructions: “Upload a transparent PNG, 300×100 recommended”
FaviconImageInstructions: “32×32 or 64×64 pixels”
Phone NumberTextPlaceholder: “+1 (555) 000-0000”
Email AddressEmailPlaceholder: “[email protected]
AddressTextareaRows: 3
  1. Add another Tab field labeled Social Media
  2. Add these fields:
FieldTypeSettings
FacebookURLPlaceholder: “https://facebook.com/yourcompany”
Twitter / XURLPlaceholder: “https://x.com/yourcompany”
InstagramURLPlaceholder: “https://instagram.com/yourcompany”
LinkedInURLPlaceholder: “https://linkedin.com/company/yourcompany”
YouTubeURLPlaceholder: “https://youtube.com/@yourcompany”
  1. Add another Tab field labeled Footer
  2. Add these fields:
FieldTypeSettings
Copyright TextTextDefault: “(c) 2026 Company Name. All rights reserved.”
Footer LogoImageInstructions: “A smaller or inverted version of your logo”
Show Newsletter SignupTrue/FalseDefault: Yes
Newsletter HeadingTextDefault: “Subscribe to our newsletter”, Conditional: Show when Show Newsletter Signup is Yes
Newsletter SubtextTextDefault: “Get updates delivered to your inbox”
  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 three tabs: General, Social Media, and Footer
  3. Fill in the company name, upload the logo, and enter contact details on the General tab
  4. Switch to Social Media and paste your social profile URLs
  5. Switch to Footer and customize the copyright text and newsletter settings
  6. Click Save Changes (the button is at the top or 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 Tabs within field groups to organize related fields without creating separate sub-pages for every category
  • Set default values on fields so the site looks correct even before settings are filled in
  • Add Message fields with instructions like “Upload a transparent PNG logo at 300×100 pixels for best results”
  • Use Conditional Logic to hide secondary fields until they are relevant — e.g. enable Conditional Logic on the Newsletter Heading field and set the rule “Show Newsletter Signup equals Yes” so the heading only appears when the toggle is on. Eleven operators are available (equals, contains, regex, empty, numeric comparisons), and chained rules cascade automatically.
  • Keep it simple — only 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