Support

Account

Home Forums Backend Issues (wp-admin) Remove ACF from Wp-admin Menu Reply To: Remove ACF from Wp-admin Menu

  • Hi wleefro & Elliot,

    I stumbled upon this problem myself today whilst preparing a website for delivery to a client.

    The thing that appears to have changed in WP is the order in which the “add_action” for triggering the function with the “remove_menu_page” to remove the ACF menu item is executed.

    This used to be after the “add_menu_page” that is used within the ACF plugin, but now it runs before the menu item is added so it is not removed in the end.

    So what I’ve simply done to make it work is change the order (priority) for my removal function to ‘999’ so it is executed after ACF adds the item to the menu:

    	function remove_acf_menu() {
    		remove_menu_page('edit.php?post_type=acf');
    	}
    	add_action( 'admin_menu', 'remove_acf_menu', 999);
    

    It might be a good idea to update the following “How to” page with this information since I also ended up on that page whilst searching:

    http://www.advancedcustomfields.com/resources/how-to/how-to-hide-acf-menu-from-clients/