Support

Account

Home Forums Add-ons Options Page How to hide "Options Page" menu item for specific users Reply To: How to hide "Options Page" menu item for specific users

  • I’ve been trying this for about an hour now with no success.

    I’m trying to remove the ACF generated “Options” menu from my Dashboard and all subsequent submenus.

    I have tried using the above code provided:

    add_action( 'admin_init', 'hide_acf_options_menu', 99 );
    function hide_acf_options_menu(){
    
    	remove_menu_page('acf-options');
    
    }

    As well as a few variations that include using the hook “admin_menu”, trying out variations on the menu slug based on a print_r:

    Array ( [title] => Course Settings [menu] => Options [slug] => acf-options-course-settings [capability] => edit_posts [pages] => Array ( [0] => Array ( [title] => Course Settings [menu] => Course Settings [slug] => acf-options-course-settings [parent] => acf-options-course-settings [capability] => edit_posts ) [1] => Array ( [title] => Appearance Settings [menu] => Appearance Settings [slug] => acf-options-appearance-settings [parent] => acf-options-course-settings [capability] => edit_posts ) [2] => Array ( [title] => Certificate Settings [menu] => Certificate Settings [slug] => acf-options-certificate-settings [parent] => acf-options-course-settings [capability] => edit_posts ) ) [show_parent] => 1 )

    acf-options-course-settings would seem to be the magic menu slug, but nothing is getting rid of this Options menu. Any advice, suggestions, or request for further information would be more than welcome.