# Add an ACF Site Settings Options Page

> Registers a "Site Settings" options page with Header and Footer sub-pages in the admin, ready for ACF field groups that hold site-wide values.

- Type: PHP
- Runs: Run everywhere
- Category: [Custom Post Types & Fields](https://wpide.com/library/category/post-types/)
- Tags: acf, options-page, settings
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/acf-options-pages/

## Code

```php
add_action( 'acf/init', function () {
    if ( ! function_exists( 'acf_add_options_page' ) ) {
        return;
    }

    acf_add_options_page( array(
        'page_title' => 'Site Settings',
        'menu_title' => 'Site Settings',
        'menu_slug'  => 'site-settings',
        'capability' => 'edit_theme_options',
        'icon_url'   => 'dashicons-admin-generic',
        'position'   => 61,
        'redirect'   => false,
    ) );

    foreach ( array( 'Header', 'Footer' ) as $section ) {
        acf_add_options_sub_page( array(
            'page_title'  => $section . ' Settings',
            'menu_title'  => $section,
            'parent_slug' => 'site-settings',
            'capability'  => 'edit_theme_options',
        ) );
    }
} );
```

## Notes

Options pages need ACF PRO. Assign field groups with the rule "Options Page is equal to Site Settings" and read values with get_field( 'name', 'option' ).

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Add an ACF Site Settings Options Page" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
