[wp-trac] [WordPress Trac] #19241: custom post type with extra rewrite rules doesnt work with permalin structure with %category%

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 10 11:31:22 UTC 2012


#19241: custom post type with extra rewrite rules doesnt work with permalin
structure with %category%
--------------------------+------------------------------
 Reporter:  moz667        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Canonical     |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Changes (by duck_):

 * version:   => 3.0
 * component:  General => Canonical


Comment:

 This is caused by the canonical redirect that checks for is_single() and
 %category% in the permalink structure. It then does a redirect even if a
 category name wasn't included in the query (e.g. for a custom post type
 request, or your extra rule). See #11907, [13781] and [13798].

 One fix could be to check for `get_query_var( 'category_name' )` before
 performing a redirect.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19241#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list