Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#40181 closed defect (bug) (invalid)

Custom Post Type with post type = 'post_type'

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

Description

When I create a CPT this way:

<?php
register_post_type( 'post_type', $args );

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

Change History (2)

#1 @swissspidy
10 years ago

There's a long list of reserved terms in WordPress core, which can be found here: ​https://codex.wordpress.org/Reserved_Terms

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

#2 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → 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.