[wp-trac] [WordPress Trac] #18614: post_type_archive_title doesn't work when tax_query is added to wp_query

WordPress Trac noreply at wordpress.org
Sat Dec 29 20:36:08 UTC 2012


#18614: post_type_archive_title doesn't work when tax_query is added to wp_query
-------------------------------------+-----------------------
 Reporter:  wonderboymusic           |       Owner:
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  3.6
Component:  Template                 |     Version:  3.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |
-------------------------------------+-----------------------
Changes (by wonderboymusic):

 * keywords:  has-patch => has-patch needs-refresh
 * milestone:  Future Release => 3.6


Comment:

 > While it is nearly impossible to tell the difference between /tag/some-
 tag/?post_type=type and /type/?tag=some-tag (and certainly so when rewrite
 rules are off)

 `WP::$matched_query` is always correct when it comes to precedence when
 rewrite rules are on.

 When the URL is `wordpress-core/tag/woo/?post_type=sport`:

 `["matched_query"]=> string(7) "tag=woo"`

 When the URL is `wordpress-core/sport/?tag=woo`:

 `["matched_query"]=> string(15) "post_type=sport"`

 Relying on the `WP` property will also prevent a `tax_query` from stomping
 the `matched_query` in `get_queried_object`

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


More information about the wp-trac mailing list