How To Fix BuddyPress Titles When Using Yoast SEO
Here is How to Fix the Issue
There is no option within the Yoast SEO settings to restore the titles or manage the SEO settings for any BuddyPress page or BuddyPress content. Therefore to fix this issue, you will have to insert code that we have written to restore those titles./**
* Removes WordPress SEO Title Filter On BuddyPress Pages
*
* @version 1.0.0
* @since 1.0.0
* @return void
*/
if ( defined('BP_VERSION') ) {
function sert_remove_bp_wpseo_title() {
if ( function_exists( 'wpseo_auto_load' ) && function_exists( 'bp_is_blog_page' )
&& ! bp_is_blog_page() ) {
$wpseo_instance = WPSEO_Frontend::get_instance();
remove_filter( 'pre_get_document_title', array( $wpseo_instance, 'title' ), 15 );
}
}
add_action( 'init', 'sert_remove_bp_wpseo_title' );
}
The above code can be safely added to the following files:
- functions.php file
- site-specific plugin
Scott Hartley
Founder & CEO, Sert Media
Founder and CEO of Sert Media, a Nashville-based digital marketing agency. Scott has spent over 15 years helping businesses grow through SEO, web performance optimization, and strategic digital marketing. His deep expertise in WordPress development, site speed, and technical SEO has guided hundreds of brands toward measurable results. When he's not auditing Core Web Vitals or refining campaign strategies, he's writing about the tools, techniques, and trends shaping the modern web.
Related Articles
How to Add Security Headers to WordPress Using Cloudflare Transform Rules
If you've ever run your WordPress site through securityheaders.com and gotten a D or F…
Use This Cloudflare Rule To Reduce Plugin Hack Attempts
Cloudflare Firewall Rules give you a lot of flexibility in further protecting your website. Here…
Set Up Cloudflare's Automatic Platform Optimization Feature
Automatic Platform Optimization (APO) is a new feature from Cloudflare that allows you to cache…