[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
Fri Sep 6 23:22:03 UTC 2013


#18614: post_type_archive_title doesn't work when tax_query is added to wp_query
----------------------------------------+-----------------------------
 Reporter:  wonderboymusic              |       Owner:  wonderboymusic
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  3.7
Component:  Template                    |     Version:  3.2
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+-----------------------------

Comment (by wonderboymusic):

 1. This check needs to happen in `get_post_type_object()`. If an array is
 passed, in needs to do `$post_type = reset( $post_type );`. There are 8-10
 places in core where the query var is passed.

 2. As long as `is_tax()` is false when the `post_type` obj is the queried
 object, I think it is safe.

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


More information about the wp-trac mailing list