This topic has 9 replies, 5 voices, and was last updated 7 years by eric75.

  • Author
  • #48244
     giorgos
    Participant

    Title tags for buddypress pages are incorrect. See also demo. The only ones are set ok are for the rtmedia pages.
    How can we set the title tags set by buddypress? for example

    Now it saws this one:
    <title>- Kleo Template</title>
    instead of this:
    <title>Youth Team | members | Groups | Kleo Template</title>

    #48372
     Radu
    Moderator

    Have you tried this plugin ?

    https://yoast.com/wordpress/plugins/seo/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    Attachments:
    You must be logged in to view attached files.
    #48375
     sharmstr
    Moderator

    @radu, can you talk to abe about this? The title displays correctly using the 2014 or 2015 themes. I dont think people should have to install anything to make it work with Kleo. Just my opinion.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #48559
     giorgos
    Participant

    I’m using WordPress SEO, but its titles are messed up for BP. See example http://www.applesocial.net/members/gk/
    Title presented is just an article from the blog for all member/group pages??

    #48564
     Radu
    Moderator

    Hello,

    This issue will be fixed on the next update.

    Sorry for any inconvenience

    Thank you for your understanding

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #48591
     giorgos
    Participant

    Is there any temp workaround in order to satisfy SEO? Having all BP pages showing as title the title of a blog page is not really google friendly. Next release might take a while.

    I also noticed than when deactivating woocommerce the title of the blog page that goes to BP pages is gone.

    #48736
     giorgos
    Participant

    The issue is on individual BP pages only and not on main dir pages (/members, /groups)

    #48803
     Andrei
    Moderator

    @Radu , @sharmstr , as you can read in the following page, the problem is generated by an incompatibility between WordPress SEO plugin and buddypress, and there’s nothing wrong in the theme.
    https://buddypress.org/support/topic/buddypress-2-2-1-incompatible-with-yoast-seo-botched-page-titles/

    From the given solutions out there ( as how this incompatibility issue is an older subject out there ), I found the following code to work.

    @giorgos
    , please add the following piece of code in your functions.php file.

    COPY CODE
    
    
    /**
     * Fix wpseo title
     */
    add_filter('wpseo_title', 'buddypress_wpseo_title');
    
    function buddypress_wpseo_title($title) {
        $wpseo = WPSEO_Frontend::get_instance();
        $separator = $wpseo->options['separator'];
    
        $separator_options = array(
            'sc-dash' => '-',
            'sc-ndash' => '–',
            'sc-mdash' => '—',
            'sc-middot' => '·',
            'sc-bull' => '•',
            'sc-star' => '*',
            'sc-smstar' => '⋆',
            'sc-pipe' => '|',
            'sc-tilde' => '~',
            'sc-laquo' => '«',
            'sc-raquo' => '»',
            'sc-lt' => '<',
            'sc-gt' => '>',
        );
    
        if (array_key_exists($separator, $separator_options)) {
            $separator = $separator_options[$separator];
        }
        $bp = buddypress();
        if (bp_is_user()) {
            $title = bp_get_displayed_user_fullname() . ' | ' . ucfirst($bp->current_component);
        } elseif (bp_is_group()) {
            $title = bp_get_current_group_name() . ' | ' . $bp->bp_options_nav[$bp->groups->current_group->slug][bp_current_action()]['name'];
        }
    
        return $title . ' ' . $separator . ' ' . get_bloginfo();
    }
    

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #48815
     giorgos
    Participant

    @Andrei Thanks!! That did the trick. I believe this is the only code out there that solves the well known BP compatibility issues with Yoast’s SEO plugin.The one I used (on bp-custom.php) stopped working, therefor I assumed that was a theme issue.
    Much appreciate your help on this.

    #135761
     eric75
    Participant
Viewing 10 posts - 1 through 10 (of 10 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?