I was wondering what would be the proper way to remove submenu with duplicate name in custom post type in the admin. I tried to use remove_submenu_page() however since its a duplicate it is showing same slug for menu and submenu /wp-admin/edit.php?post_type=portfolio and to use that function my understanding slugs should be different

enter image description here


The following code seems to work and remove duplicate name from Porfolio custom post type

'all_items'     => __( '' )
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.