Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    So you only want to be able to reach the settings menus by manually typing in the correct url?

    It may be interesting to hide the menu for clients, for example.

    You can achieve this by adding this code to your functions.php:

    function remove_cpt_menu() {
    	remove_menu_page( 'cpt_main_menu' );
    }
    add_action( 'admin_menu', 'remove_cpt_menu' );
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Note that would remove it for everyone, not just specific users.

    This doesn’t work anymore since the upgrade, It should now be

    function remove_cpt_menu() {
    	remove_menu_page( 'cptui_main_menu' );
    }
    add_action( 'admin_menu', 'remove_cpt_menu' );

    Thanks

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    For those potentially confused, Adewale changed the part in remove_menu_page( 'cptui_main_menu' ); to include the “ui” portion of the menu slug “cpt_” vs “cptui_”

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove CPT UI from the Dashboard menu’ is closed to new replies.