Page Title Not working for buddypress on activating Yoast Plugin

We are aware of both plugins i.e buddypress and yoast. Buddypress is one of the premium plugin to create a social networking and Yoast plugin helps us to boast our search engine optimization. A few week ago I installed the buddypress and faced an issue of Page Title Not working for buddypress on activating Yoast Plugin. For me, the tiltle of profile page is not showing correctly.



The problem of Page Title Not showing for buddypress on activating Yoast Plugin is quite common and faced by many other wordpress users.If we talk about a profile page of an user in buddypress, The page heading will not appear properly. It should output the [Full Name] - Website Name. But, It will be like [-] Website Name. I read articles and forum for the same and found a solution for the same. If you have access to functions.php of your wordpress theme, you can fix it without changing any core files.
 <h2> Page Title Not working for buddypress on activating Yoast Plugin - Fix </h2>
  1. Just open your functions.php file of your theme.
  2. Copy the following code and paste it in your functions.php file.
function wpseo_fix_title_buddypress($title) {     // Check if we are in a buddypress page      if (function_exists( 'buddypress') &amp;&amp;  buddypress()-&gt;displayed_user-&gt;id ||  buddypress()-&gt;current_component ) {         $bp_title_parts = bp_modify_document_title_parts();          // let's rebuild the title here         $title = $bp_title_parts['title'];     }     return $title; } add_filter( 'wpseo_title', 'wpseo_fix_title_buddypress');  

Comments

Popular posts from this blog

Wordpress on Bluemix - Create a wordpress website

Buddypress Demo Website - Learn Buddypress

IBM Bluemix Pricing For Wordpress Cloud Hosting