add_submenu_page for CPT
-
I’m unable to create a working submenu page for a custom post type that is using nested pages when Replace Default Menu is checked. (It’s a settings page I add to all my custom post page, which allows me to add some intro text to the top of the archive page for each CPT).
My code loops round each CPT and uses add_submenu_page to create submenu. It works correctly for CPTs not using nested pages, but not for those that do. The url for the submenu should be:
/wp-admin/edit.php?post_type=mycpt&page=mycpt-intro-text
However for the CPT using the nested pages, this url is:
admin.php?page=showreel-intro-text
If I uncheck Replace Default Menu it works fine.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add_submenu_page for CPT’ is closed to new replies.