Skip to content

Instantly share code, notes, and snippets.

@jonbrockett
Last active June 10, 2021 13:53
Show Gist options
  • Save jonbrockett/aa5da1fcc8ee805e9eb5312419b3281c to your computer and use it in GitHub Desktop.
Save jonbrockett/aa5da1fcc8ee805e9eb5312419b3281c to your computer and use it in GitHub Desktop.
ACF Option Pages
<?php
/**
* ACF Option Pages
*/
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'Site Settings',
'menu_title' => 'Site Settings',
'menu_slug' => 'site-settings',
'capability' => 'edit_posts',
'redirect' => false
));
acf_add_options_sub_page(array(
'page_title' => 'Header Settings',
'menu_title' => 'Header',
'parent_slug' => 'site-settings',
));
acf_add_options_sub_page(array(
'page_title' => 'Footer Settings',
'menu_title' => 'Footer',
'parent_slug' => 'site-settings',
));
}
/** Add ACF Option Pages */
require_once( 'library/acf-options.php' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment