Home › Forums › ACF PRO › Options pages not visible in side menu › Reply To: Options pages not visible in side menu
Just to provide a little more detail.
if(function_exists('acf_add_options_page')) {
acf_add_options_page(array(
'page_title' => 'My Settings Page',
'menu_title' => 'My Settings',
'menu_slug' => 'my_settings',
'capability' => 'edit_posts',
'redirect' => false,
));
acf_add_options_sub_page(array(
'title' => 'Header',
'slug' => 'header',
'parent' => 'my_settings',
));
}
Also to note, if you have 2 acf_add_options_page() with acf_add_options_sub_page() of the same ‘title’ you will need to use a different slug.
acf_add_options_sub_page(array(
'title' => 'Header',
'slug' => 'header',
'parent' => 'my_settings',
));
acf_add_options_sub_page(array(
'title' => 'Header',
'slug' => 'other_header',
'parent' => 'my_other_settings',
));
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.