-
Author
-
December 2, 2015 at 13:46 #90527
lopreg
ParticipantHi,
I am using the wordpress seo plugin on my site which I discovered doesn’t work well for titles on budypress pages. I used the code snippet below to fix the issue.
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(); }However, certain pages on my site now show my site name twice on the titles as can be see here =>http://urlgone.com/301/25fd31/.
How can this be fixed?
I have looked at http://kb.yoast.com/article/76-the-seo-title-output-for-the-plugin-doesnt-work-as-expected but can’t find where to implement it on kleo. The Force a Rewrite option did not fix the issueDecember 3, 2015 at 21:30 #91011Laura
ModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! πHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 4, 2015 at 00:18 #91043lopreg
ParticipantThanks for the response @Laura. I think I solved the issue by editing some of WpSEOs title templates from the default %%title%% %%page%% %%sep%% %%sitename%% to just %%title%%. What I don’t know is if this will have any negative SEO effect in future.
If there is a better way around this, I will love to know. Thanks againMarch 1, 2016 at 16:58 #107723touren
Participantdoes for the double title post already exist a tweek?
March 1, 2016 at 17:44 #107752rikbutterflyskull
Participanti fixed the previous snippet for the double title:
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()) { return bp_get_displayed_user_fullname() . ' ' . $separator . ' ' . get_bloginfo(); } elseif (bp_is_group()) { return bp_get_current_group_name() . ' ' . $separator . ' ' . get_bloginfo(); } return $title; }Yoast SEO has know problems with buddypress.
Another trick: https://bp-tricks.com/coding/making-buddypress-compatible-with-the-wordpress-seo-plugin-from-yoast/March 1, 2016 at 17:57 #107757touren
Participantthank you!! this worked!
Do you have a clue how I can get Buddypress activity posts in meta title more SEO friendly
I would like to have an individual title and meta description for each activity post.
How can I get an excerpt of the first 6 words of the activity post as title and also as meta description (in best case also the first 6 words comma separated as meta keywords)
I refer to posts like this http://seventhqueen.com/themes/kleo/members/demo/activity/90874/ β in the title and meta should then appear βlet see the the viewβpls. can somebody help me to get this work!!
March 1, 2016 at 18:19 #107791rikbutterflyskull
ParticipantUse the BuddyPress Support or wordpress.stackexchange.com for this things. It’s not a easy task what you want to do
September 12, 2016 at 01:43 #135763eric75
ParticipantThis seems to be the solution:
https://buddydev.com/buddypress/making-wordpress-seo-plugin-compatible-with-buddypress-part-2/
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.