Home Forums Add-ons Options Page Hide Option Page


Hide Option Page

  • So I have registered a two custom option pages however I want to hide one depending on the user capabilities. This is what I have so far…

    add_action ('admin_menu', 'remove_homepage_options', 999 );
    function remove_homepage_options()
    	if( current_user_can( 'edit_custompost') ) {

    I have also tried it with remove_submenu_page and it doesn’t work ether. Thoughts??

  • Hi @gnuandyou

    In the latest version of the options page, you can specify sub page specific capabilities!

    Read more here:

  • I noticed when I read the change log… Almost like you read my mind 🙂

    Thanks you sir.

  • While this works for caps I was looking at doing something like your tutorial on hiding options page from clients, but for specific sub menu pages. However I can’t seem to get remove_submenu_page to target the page properly.

    I registered an Admin Settings (acf-options-admin-settings) and Client Settings (acf-options-client-settings) sub pages, but when I attempt to remove the sub page it does’t work.

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

The topic ‘Hide Option Page’ is closed to new replies.