Support

Account

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','');
    }