[wp-trac] [WordPress Trac] #13022: Pretty Permalinks not working with custom post type
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 15 19:24:19 UTC 2010
#13022: Pretty Permalinks not working with custom post type
--------------------------+-------------------------------------------------
Reporter: bigdawggi | Owner: ryan
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Permalinks | Version: 3.0
Severity: major | Keywords: permalinks, rewrite, custom post type, post type
--------------------------+-------------------------------------------------
Not sure if this is related to #12870, but it seems like a different
issue so I'm starting up a new ticket. Feel free to merge if necessary.
I registered a custom post type (FAQ) as follows:
{{{
register_post_type('FAQ', array(
'label' => __('FAQs'),
'singular_label' => __('FAQ'),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => true,
'rewrite' => array('slug' => 'FAQ'),
'query_var' => true,
'supports' => array('title', 'editor', 'author'),
'taxonomies' => array('category'),
));
// Allow the category taxonomy to be used for FAQs as well
register_taxonomy_for_object_type('category', 'FAQ');
}}}
I have permalinks set to a fairly standard:
{{{
/%year%/%monthnum%/%postname%/
}}}
When I visit the url for the published FAQ (http://3.local/FAQ/test-1-in-
faq/) it gives me the "Hello World" post, which isn't a FAQ. :)
If I go to this URL (http://3.local/FAQ/test-1-in-faq/?post_type=FAQ) it
returns the proper post.
If I turn off permalinks entirely I can properly visit the post at:
http://3.local/?post_type=FAQ&p=3
I also tried using a lower-case slug for the rewrite's slug value, but
http://3.local/faq/test-1-in-faq/ returns a 404 page.
I'm using Rev 13954 (I believe that's the 3.0b release), but have also
experienced similar behavior using the latest trunk.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13022>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list