bbp_is_reply( int $post_id )

Check if current page is a Forums reply

Description

Parameters

$post_id

(Required) Possible post_id to check

Return

(bool) True if it's a reply page, false if not

Source

File: bp-forums/common/template.php

472
473
474
475
476
477
478
479
480
481
482
function bbp_is_reply( $post_id = 0 ) {
 
    // Assume false
    $retval = false;
 
    // Supplied ID is a reply
    if ( !empty( $post_id ) && ( bbp_get_reply_post_type() === get_post_type( $post_id ) ) )
        $retval = true;
 
    return (bool) apply_filters( 'bbp_is_reply', $retval, $post_id );
}

Changelog

Changelog
Version Description
bbPress (r2549) 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.