Sage 9, ACF Options page not appear

Hi guys, im working on Sage 9 with ACF PRO and i want to make theme options page but it’s not working.

Here is my code:


namespace App;

if(function_exists('acf_add_options_page') ) {

Its looks like there is no ‘acf_add_options_page’ function when i debug with echo

Can you help me?

Try with add your code to setup.php and init anonymous function

add_action('init', function() {

 // your code
 if(function_exists('acf_add_options_page') ) {
    page_title => 'Title page',
    // other settings


Link to ACF documentation with ACF options page settings

Still nothing… :frowning: Any other ideas?

After add below action you should have option page in acf


add_action('init', function () {
    if (!function_exists('acf_add_options_page')) {
        'page_title'    => 'Example Settings',
        'menu_title'    => 'Example Settings',
        'menu_slug'     => 'examplesettings',
        'capability'    => 'edit_posts',
        'parent_slug'   => '',
        'position'      => 2, 
        'icon_url'      => 'dashicons-admin-generic'

I know but it’s still not working. When i remove if statement there is error:
Fatal error: Uncaught Error: Call to undefined function App\acf_add_options_page()

Ok, i got it! Thanks for help!

I assume this was a namespace issue but it might be helpful to anyone coming here in the future if you describe what the solution was.

I reinstalled ACF PRO and it started to work…

This topic was automatically closed after 42 days. New replies are no longer allowed.