Opened 15 years ago
Closed 13 years ago
#1591 closed defect (bug) (worksforme)
bbp_is_topic_tag not functioning correctly
| Reported by: | griffinjt | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0 |
| Component: | Component - Topic Tags | Version: | |
| Severity: | normal | 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
@
15 years ago
- Resolution → worksforme
- Status new → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Where are you using bbp_is_topic_tag()? It works in the other places it's used.