Home › Forums › ACF PRO › Options Page doesn't show up in WP admin menu › Reply To: Options Page doesn't show up in WP admin menu
Hi,
Try this:
if( function_exists('acf_add_options_page') ) {
// Adds ACF Pro options page for Global Options
$globalOptions = acf_add_options_page(array(
'page_title' => 'Global Options',
'menu_title' => 'Global Options',
'menu_slug' => 'global-options',
'capability' => 'edit_posts',
'redirect' => false
));
// Adds ACF Pro sub options page for Header
acf_add_options_sub_page(array(
'page_title' => 'Header Settings',
'menu_title' => 'Header',
'parent_slug' => $globalOptions['menu_slug'],
));
// Adds ACF Pro sub options page for Footer
acf_add_options_sub_page(array(
'page_title' => 'Footer Settings',
'menu_title' => 'Footer',
'parent_slug' => $globalOptions['menu_slug'],
));
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.