bbp_set_404()

Sets the 404 status.

Description

Used primarily with topics/replies inside hidden forums.

Source

File: bp-forums/common/functions.php

function bbp_set_404() {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.', 'buddyboss' ), '3.1' );
		return false;
	}

	$wp_query->set_404();
}

Changelog

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