Opened 13 years ago
Closed 11 years ago
#1591 closed defect (bug) (worksforme)
bbp_is_topic_tag not functioning correctly
Reported by: | griffinjt | Owned by: | |
---|---|---|---|
Milestone: | 2.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Component - Topic Tags | Keywords: | reporter-feedback |
Cc: |
Description
I believe I found a bug, but I'm not entirely sure.
I just started using the bbPress plugin today (which rocks) and began having issues conditionally targeting the topic-tag taxonomy pages. I had tried the following:
if ( bbp_is_topic_tag() )
but it did not work, so I then tried using WP's taxonomy conditional:
if ( is_tax( 'topic-tag' ) ) and targeting the term as well, if ( is_tax( 'topic-tag', 'forum-rules' ) )
but that did not work either. After printing $wp_query, I was able to target it by this:
global $wp_query; if ( $wp_query->query_vars['taxonomy'] == 'topic-tag' )
Shouldn't bbp_is_topic_tag do this? Or am I out in left field?
Change History (5)
#2
@
13 years ago
- Resolution set to worksforme
- Status changed from new to closed
Logically, no. Since if we would be loading a topic tag widget, then $wp_query->query_vars['taxonomy']
would be set to topic-tag
and bbp_is_topic_tag()
is supposed to give back a true
only when it's a topic tag page. Where are you trying to use it? Closing this as worksforme.
Where are you using bbp_is_topic_tag()? It works in the other places it's used.