bbp_is_single_user_profile()

Check if current page is a user profile page

Description

Return

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

Source

File: bp-forums/common/template.php

function bbp_is_single_user_profile() {
	global $wp_query;

	// Assume false
	$retval = false;

	// Check query
	if ( !empty( $wp_query->bbp_is_single_user_profile ) && ( true === $wp_query->bbp_is_single_user_profile ) )
		$retval = true;

	return (bool) apply_filters( 'bbp_is_single_user_profile', $retval );
}

Changelog

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