Remove “posts” from admin but show a custom post

Doing this search, I’ve found this fine answer by Chris_O. There’s even a jQuery solution I proposed there.

Anyway, the function remove_menu_page('edit.php'); only removes the Posts menu.

But, as we learn from Chris answer, remove_menu_page('edit.php?post_type=athletes'); removes the Custom Post Type menu.

To really block access to the URL, as we’re merely hiding the menu item, check the following Q&A: Blocking Administrative Access to Authors and Subcribers?

Leave a Comment