Opened 7 years ago
Closed 6 years ago
#3071 closed defect (bug) (fixed)
Topic Tags don't have $wp_query state
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Component - Topic Tags | Keywords: | commit |
Cc: |
Description
Topic Tags have an empty global $wp_query
state after action parse_query
.
Functions is_archive()
, is_tax()
and related all return false.
$wp_query->query_vars->taxonomy
is correctly set, however.
Change History (5)
#1
@
7 years ago
- Component changed from General to Component - Topic Tags
- Keywords reporter-feedback added
#2
@
7 years ago
@thebrandonallen
Theme: Twenty Sixteen
Plugins: bbPress, that's it.
WP: 4.8-alpha-40139
Code:
<?php add_action( 'wp_head', 'dump_wp_query' ); function dump_wp_query() { var_export( array( 'is_single' => is_single(), 'is_page' => is_page(), 'is_singular' => is_singular(), 'is_category' => is_category(), 'is_tag' => is_tag(), 'is_tax' => is_tax(), 'is_post_type_archive' => is_post_type_archive(), 'is_archive' => is_archive(), 'is_author' => is_author(), 'is_date' => is_date(), 'is_year' => is_year(), 'is_month' => is_month(), 'is_day' => is_day(), 'is_time' => is_time(), 'is_search' => is_search(), 'is_404' => is_404(), 'is_attachment' => is_attachment(), 'is_main_query' => is_main_query(), 'is_bbpress' => is_bbpress(), 'bbp_is_topic_tag' => bbp_is_topic_tag(), ) ); }
Output:
array ( 'is_single' => false, 'is_page' => false, 'is_singular' => false, 'is_category' => false, 'is_tag' => false, 'is_tax' => false, 'is_post_type_archive' => false, 'is_archive' => false, 'is_author' => false, 'is_date' => false, 'is_year' => false, 'is_month' => false, 'is_day' => false, 'is_time' => false, 'is_search' => false, 'is_404' => false, 'is_attachment' => false, 'is_main_query' => true, 'is_bbpress' => true, 'bbp_is_topic_tag' => true, )
#3
@
7 years ago
I also am seeing is_tax
returns true
for both the Twenty Seventeen and Twenty Sixteen themes
Note: See
TracTickets for help on using
tickets.
@Cybr
I can confirm that
is_archive
isfalse
, butis_tax
istrue
when visiting topic tag pages for me. Can you verify thatis_tax
is indeedfalse
on topic tag pages for you?