Skip to:
Content

bbPress.org

Opened 13 years ago

Closed 11 years ago

#1591 closed defect (bug) (worksforme)

bbp_is_topic_tag not functioning correctly

Reported by: griffinjt's profile 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)

#1 @cnorris23
13 years ago

  • Keywords reporter-feedback added

Where are you using bbp_is_topic_tag()? It works in the other places it's used.

#2 @GautamGupta
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.

#3 @johnjamesjacoby
13 years ago

  • Milestone changed from Awaiting Review to 2.0
  • Version 2.0 deleted

#4 @michelwppi
11 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I reopen it to announce this new ticket Strange behaviors with topic-tag taxonomy #2444
Best regards
M.

Last edited 11 years ago by michelwppi (previous) (diff)

#5 @netweb
11 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

There is no need to reopen this ticket, if you want to leave a link to a newly created ticket that you think is related just write a comment eg. 'Related #2444'.

Closing again with original resolution.

Note: See TracTickets for help on using tickets.