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

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 15 23:58:58 UTC 2011


#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:  Awaiting Review
Component:  Template               |     Version:  3.2
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------------------

Comment (by SergeyBiryukov):

 From #19035:

 > Example: When viewing `example.com/my_post_type/?my_taxonomy=my_term`,
 the return value of `get_queried_object()` is the term object, not the
 post type object. This causes a PHP notice when
 `post_type_archive_title()` attempts to access the label for the post type
 object, and results in a blank title.

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


More information about the wp-trac mailing list