WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#41820 closed defect (bug) (duplicate)

CPTs are not showing by default on Appearances > Menus page

Reported by: mehul0810 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.1
Component: Menus Keywords:
Focuses: administration Cc:
PR Number:

Description

I have noticed that with fresh WP instance adding CPTs using register_post_type and setting public to true doesn't show that CPT on Appearances > Menus page.
Also, found that the CPT created is listed under metaboxhidden_nav-menus from function https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/nav-menu.php#L163

However, It should work with public set to true or show_in_nav_menus set to true. But its not showing when fresh install or Screen Options not set.

Alternative Suggestion: We can overcome this issue by adding a filter here https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/nav-menu.php#L169

Change History (5)

#1 @kevinwhoffman
2 years ago

I agree that a public post type with show_in_nav_menus set to true should be visible in the Menus screen by default. This would be consistent with the visibility of post types in the Customizer's menu editor.

#2 @SergeyBiryukov
2 years ago

  • Component changed from General to Menus

#3 @barryceelen
2 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #16828.

#4 @barryceelen
2 years ago

Hi @mehul0810 thanks for reporting this. This issue is already tracked in #16828

#5 @SergeyBiryukov
2 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.