[wp-hackers] Custom post type & hierarchical

Michael Clark dc153464a11bcf5aeb18180db28017fb.wp-hackers at planetmike.com
Sat Aug 21 22:39:09 UTC 2010

While designing a new theme, I've set up a new post type, with the following:

register_post_type( 'shows',
     'labels' => array(
         'name' => __( 'Shows' ),
         'singular_name' => __( 'Show' ) ),
     'public' => true,
     'menu_position' => 7,
	'hierarchical' => true,
	'capability_type' => 'page',
	'supports' => array('title', 'editor', 

I've added a new "Show" of "1998 Season". Then I added in a show that 
was in that season. You Can't Take it With You. In the admin area: 
http://www.example.com/wp-admin/edit.php?post_type=shows I see the 
show in the hierarchy correctly. But when I click on the View link 
under the show title 
I get a 404 error. If I remove 1998-season from the URL, the page 
shows up just fine. Is this a WordPress bug, or have I done something 
wrong somewhere along the way? Searching the Codex, WP forums and 
Google isn't turning up anything useful.


Michael Clark

"Injustice anywhere is a threat to justice everywhere."
  - Martin Luther King Jr.

More information about the wp-hackers mailing list