_bp_maybe_remove_redirect_canonical()

Remove WP’s canonical redirect when we are trying to load BP-specific content.

Description

Avoids issues with WordPress thinking that a BuddyPress URL might actually be a blog post or page.

This function should be considered temporary, and may be removed without notice in future versions of BuddyPress.

Source

File: bp-core/bp-core-catchuri.php

function _bp_maybe_remove_redirect_canonical() {
	if ( ! bp_is_blog_page() )
		remove_action( 'template_redirect', 'redirect_canonical' );
}

Changelog

Changelog
Version Description
BuddyPress 1.6.0 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.