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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.