Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40181 closed defect (bug) (invalid)

Custom Post Type with post type = 'post_type'

Reported by: displaynone's profile displaynone Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.3
Component: Posts, Post Types Keywords:
Focuses: administration Cc:


When I create a CPT this way:

register_post_type( 'post_type', $args );

No posts, CPTs, ... are shown, but the posts count is correct

Change History (2)

#1 @swissspidy
7 years ago

There's a long list of reserved terms in WordPress core, which can be found here:

There's a ticket for preventing post types with such names from being registered as well, see #31154.

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @displaynone, welcome to WordPress Trac! Thanks for the report.

As noted above, post_type is one of the reserved terms that cannot be used as an actual post type name.

Note: See TracTickets for help on using tickets.