﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
18614,post_type_archive_title doesn't work when tax_query is added to wp_query,wonderboymusic,,"post_type_archive_title( ) gets called by wp_title( ) on Custom Post Type archive pages

To get the data for the post type object,  post_type_archive_title( ) calls get_queried_object( ). This is problematic. If the query has been altered in any way (such as adding a tax_query in pre_get_posts filter), get_queried_object( ) will probably return a term, not a post type object.

Hence, accessing $post_type_obj->labels will fail and their will be no title returned

{{{
//old potentially broken way
$post_type_obj = get_queried_object();

// new doesn't break way
$post_type_obj = get_post_type_object( get_post_type() );
}}}",defect (bug),reopened,normal,Future Release,Template,3.2,normal,,has-patch needs-refresh,bill.erickson@… styledev benjmay
