Support

Account

Home Forums Add-ons Options Page Beginner can't get started!

Solved

Beginner can't get started!

  • I should have been able to find my answers, but I can’t! I’ve got the ACF Pro version. I’ve created some custom fields, all good. I cannot figure out how to create an options page, or even what it’s supposed to do.

    I put this in functions.php as advised:

    if( function_exists('acf_add_options_page') ) {
    
    acf_add_options_page(); }

    Now I’m supposed to add

    acf_add_options_page( $args );

    “before the action admin_menu (priority 99)”

    I don’t know what this means! So far, I’ve either thrown a php error or got a big fat nothing.

    I’m not scared of php but am a newcomer to WordPress and don’t yet understand it. Could some kind person please explain how to get an options page and what to do with it?

  • Hi @cherry

    Adding that code should create an additional menu on the backend. I’ve attached a screenshot for your reference.

    After that, you can set your field group location to the newly created options page. I’ve attached another screenshot for your reference.

    If you still have an issue with it, I suggest you open a new ticket and provide temporary admin credentials to your site. You can open a new ticket here: https://support.advancedcustomfields.com/new-ticket. Also, please don’t forget to explain the issue again and provide the link to this thread.

    I hope this helps 🙂

  • Thanks, James! I’m very happy now 😀

    This is what I figured out: I have a functionality plugin to keep my added code in one place. In my plugin, I put

    add_action('admin_menu', 'acf_add_options_page');
    
    if( function_exists('acf_add_options_page') ) {
    	
    	acf_add_options_page();
    	
    }

    What I was missing before was the add_action part. This is not at all clear in the user guide (well, it wasn’t to me.)

    Now I can make helpful controls for my users <does a silly dance>

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

The topic ‘Beginner can't get started!’ is closed to new replies.