bbp_is_topic_tag()

Check if the current page is a topic tag

Description

Return

(bool) True if it's a topic tag, false if not

Source

File: bp-forums/common/template.php

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
function bbp_is_topic_tag() {
 
    // Bail if topic-tags are off
    if ( ! bbp_allow_topic_tags() )
        return false;
 
    // Return false if editing a topic tag
    if ( bbp_is_topic_tag_edit() )
        return false;
 
    // Assume false
    $retval = false;
 
    // Check tax and query vars
    if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( bbpress()->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) )
        $retval = true;
 
    return (bool) apply_filters( 'bbp_is_topic_tag', $retval );
}

Changelog

Changelog
Version Description
bbPress (r3311) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.