Remove/Disable Admin Page for everyone [RESOLVED]

I want to disable the Gravity Forms admin for everyone but keeping the plugin active in the background. Usually it should be possible by using the remove_menu_page function of Wordpress, but somehow this method does not work with Gravity forms. Both methods below didn’t work. What could be the solution?

function cc_remove_custom_admin_menu() {
    remove_menu_page('gf_edit_forms');
    remove_menu_page('admin.php?page=gf_edit_forms');
}
add_action('admin_menu', 'cc_remove_custom_admin_menu');

Your function is most likely running before the menu is added, try adjusting the priority, so it runs after e.g.

add_action( 'admin_menu', 'cc_remove_custom_admin_menu', 11 );

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.