I'm not sure if this is a bug but there's something weird going on here. I've been struggling to figure out why single_cat_title or wp_title won't work inside an is_category query inside a functions.php function, then I checked the contents of query variable and turns out is_category is null even if there's a value for the category name and such.
[comments] =>
[comment_count] => 0
[current_comment] => -1
[comment] =>
[found_posts] => 2
[max_num_pages] => 1
[max_num_comment_pages] => 0
[is_single] =>
[is_preview] =>
[is_page] =>
[is_archive] =>
[is_date] =>
[is_year] =>
[is_month] =>
[is_day] =>
[is_time] =>
[is_author] =>
[is_category] =>
[is_tag] =>
[is_tax] =>
[is_search] =>
[is_feed] =>
[is_comment_feed] =>
[is_trackback] =>
[is_home] =>
[is_404] => 1
[is_comments_popup] =>
[is_admin] =>
[is_attachment] =>
[is_singular] =>
[is_robots] =>
[is_posts_page] =>
[is_paged] =>
[query] => Array
(
[category_name] => news
[taxonomy] => category
[term] => news
)
queried_object is also null.
Depending on the category archive I browse, sometimes is_archive is true (1), sometimes it isn't. Sometimes the body_class also turns up a 404 error.
What could be the possible cause for this? Plugins? Permalinks? All of the above?