Home › Forums › Add-ons › Options Page › Multiple top level options pages › Reply To: Multiple top level options pages
Here is an “in a pinch” way that I accomplished multiple menus. Hope this helps someone.
if( function_exists('acf_add_options_sub_page') ) {
acf_add_options_sub_page( __('Global') );
acf_add_options_sub_page( array( 'title' => __('Top Menu'), 'parent' => 'acf' ) );
acf_add_options_sub_page( array( 'title' => __('Main Menu'), 'parent' => 'acf-options-top-menu' ) );
acf_add_options_sub_page( array( 'title' => __('Footer Menu'), 'parent' => 'acf-options-top-menu' ) );
};
if( function_exists('acf_set_options_page_title') ){
acf_set_options_page_title( __('Theme Options') );
}
function some_function() {
// silence is golden
};
add_action('admin_menu', 'setup_menu');
function setup_menu() {
add_menu_page('Theme Menus', 'Theme Menus', 'manage_options', 'acf-options-top-menu', 'some_function');
add_submenu_page('acf-options-top-menu','','Top Menu','manage_options','acf-options-top-menu','');
}
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.