Support

Account

Home Forums ACF PRO Options pages not visible in side menu

Solved

Options pages not visible in side menu

    • rsiero

    • July 8, 2014 at 7:28 pm

    I’ve installed the PRO version and want to use different options pages. I’ve tried every options to create them in functions.php, but non of them are showing them in the sidebar.

    Default i use: register_options_page(‘Website algemeen’);

    Good to know that they’re accesable by using a direct URL (/wp-admin/admin.php?page=acf-options-website-algemeen)

    Is the a PRO bug?

    • rpk

    • July 8, 2014 at 11:57 pm

    Rather a read the documentation for the upgrade from version 4 to 5 ;)))))

    See here: http://www.advancedcustomfields.com/resources/updates/upgrading-v4-v5/

    The relevant part:

    Changes to Options Pages
    Previously, the default Options page was added automatically on activation of the Options Page add-on. Now that the Options Page functionality is built into ACF PRO, this will no longer be an automatic process, and the default Options Page will need to be added manually by adding this code to your functions.php file:

    acf_add_options_page();

    It is good practice to wrap this inside a function_exists if statement and above any defined sub pages like so:

    if(function_exists('acf_add_options_page')) { 
     
    	acf_add_options_page();
    	acf_add_options_sub_page('Header');
    	acf_add_options_sub_page('Footer');
     
    }

    Best regards Ralf

    • rsiero

    • July 9, 2014 at 12:01 am

    Great 🙂

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

    • July 9, 2014 at 3:48 pm

    Great answers, didn’t no of this functionality. Thnx a lot.

    • Elliot

    • July 15, 2014 at 11:35 am

    Hey guys.

    You can read more about options page functionality here:
    http://www.advancedcustomfields.com/resources/features/options-page/

    • rpk

    • July 16, 2014 at 8:44 am

    Nice… Thanks a lot!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.