-
Author
Tagged: page title, title, title tag, buddypress, bbpress
-
April 6, 2015 at 09:04 #53370Reflect GrowthParticipant
I’ve just spotted that the page titles for the Buddy Groups / Members / Activity and for bbPress’ Forums don’t seem to follow the convention provision for by the functions in the kleo theme. All other wordpress pages will either be:
– Site Name | Description (for the homepage)
– Page / Post Title | Site Name (for any other pages / posts)But the aforementioned pages only seem to generate:
– Page Title | (with no Site Name being appended) – you can see this at: http://www.reflectgrowth.com/co-create/forums/ as an example or http://www.reflectgrowth.com/co-create/activity/
I’m sure this was working when I configured the theme a couple of months ago. I do use the “Add Meta Tags” plugin – https://wordpress.org/plugins/add-meta-tags/ but do not use this to customise title tags, and have in fact deactivated this to ensure it does not affect this issue.
Quoted from functions.php in Kleo Theme:
COPY CODEif ( ! function_exists( '_wp_render_title_tag' ) ) { function kleo_slug_render_title() { ?> <title><?php wp_title( '|', true, 'right' ); ?></title> <?php } add_action( 'wp_head', 'kleo_slug_render_title' ); } if (!function_exists('kleo_wp_title')): /** * Creates a nicely formatted and more specific title element text * for output in head of document, based on current view. * * @since Kleo Framework 1.0 * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string Filtered title. */ function kleo_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) { return $title; } // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title = "$title $sep $site_description"; } // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) { $title = "$title $sep " . sprintf( __( 'Page %s', 'kleo_framework' ), max( $paged, $page ) ); } return $title; } if ( ! function_exists( '_wp_render_title_tag' ) ) { add_filter('wp_title', 'kleo_wp_title', 10, 2); } endif;
Any thoughts why this might be happening?
April 9, 2015 at 18:07 #53793BrunoexpressParticipantHi,
I’ve got exactly the same issue. I don’t know if it had ever worked though. I installed BuddyPress only 2 weeks ago.
Have you found a solution?
April 11, 2015 at 02:14 #53985Reflect GrowthParticipantLooking at the demo sites at: http://seventhqueen.com/themes/kleo/activity/
It seems that it is meant to work, but for some reason its not for BuddyPress & bbPress.
Support – Can you guys shed any light on this at all?
My next steps are to disable all plugins and re-test, to ensure its not a plugin affecting this.
April 15, 2015 at 13:27 #54549Reflect GrowthParticipantI’ve done a disable of all plugins with the exception of bbpress & buddy press and even swapped themes the problem still persists!
So this look like a buddypress & bbpress issue? Might be that there is an action / filter that needs to be implemented to format page titles for buddypress & bbpress specifically?
@Support – How did you guys achieve this for your demo site?
April 15, 2015 at 13:34 #54550Reflect GrowthParticipantThese couple of links seem to suggest a filter that might work – I’ll try and have a go at this next:
– https://buddypress.org/support/topic/editing-group-and-forum-page-title-tags/
– https://buddypress.org/support/topic/how-to-edit-title-tags/I reckon bp_modify_page_title is the filter worth looking at! I’ll update when I get 5 🙂
April 15, 2015 at 18:57 #54649AndreiModeratorThis issue is in the most cases created by the Yoast Seo plugin, which has an old, known, incompatibility with buddypress. Here is a topic in which I’ve given a fix to the issue, please let me know if it works in your case also:
https://archived.seventhqueen.com/forums/topic/title-tags-for-groups-members-are-missing
Looking forward.
CheersHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 18, 2015 at 02:29 #55014Reflect GrowthParticipantThanks Andrei, I did take a look but I think that may be specific to the plugin you mentioned. Unless I’m missing something?
I’ve tried using the ‘bp_modify_page_title’ filter which works for changing the page title for Buddypress pages successfully. The same issue exists for bbPress pages, so I’m now hunting for a similar filter I can use for those pages too.
COPY CODE/* BuddyPress & bbPress: Page Title fix */ add_filter( 'bp_modify_page_title', 'my_page_title', 10); // Works for BP pages fine :) add_filter('bb_title', 'my_page_title'); // Doesn't work for BB pages :( function my_page_title( $title) { return $title.' Reflect Growth'; // TODO: Change to dynamic WP func call. }
As an aside, I’m wondering if this issue cropped up when WordPress 4.1 introduced the theme support for page titles? Can’t substantiate that one though, just a little puzzled as I’m sure this was working fine.
April 28, 2015 at 02:17 #56370AndreiModeratorHi,
This incompatibility between yoast-seo and buddypress/bbpress is older than wp 4.1 and the new title tags support.
I hope that with the new title tag support all plugins will align to the new standards and make everyone life easier.Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 29, 2015 at 03:11 #56552bradhParticipantI am encountering this problem but do not have the Yoast (or any) SEO plugin. Any idea what this could be?
April 29, 2015 at 03:33 #56554bradhParticipantI should note that I am only having issues with bbPress.
May 2, 2015 at 04:10 #57008bradhParticipantAn response to this thread would be most appreciated — the issue I have presented is limited to bbPress and I would like to correct the SEO of my website.
May 2, 2015 at 21:51 #57071bradhParticipantReflect Growth, the following code will correct your issue for bbPress pages…
COPY CODE/* BuddyPress & bbPress: Page Title fix */ add_filter( 'bp_modify_page_title', 'my_page_title', 10); // Works for BP pages fine :) add_filter('bb_title', 'my_page_title'); // Doesn't work for BB pages :( function my_page_title( $title) { return $title.' Reflect Growth'; // TODO: Change to dynamic WP func call. }
May 2, 2015 at 21:52 #57072bradhParticipantSorry, correction listed below…
COPY CODE/* BuddyPress & bbPress: Page Title fix */ add_filter( 'bp_modify_page_title', 'my_page_title', 10); // Works for BP pages fine :) add_filter('bbp_title', 'my_page_title'); // Doesn't work for BB pages :( function my_page_title( $title) { return $title.' Reflect Growth'; // TODO: Change to dynamic WP func call. }
May 2, 2015 at 21:58 #57074bradhParticipantReflect Growth, the following code is an update to your fix that includes a dynamic call…
COPY CODE/* BuddyPress & bbPress: Page Title fix */ add_filter( 'bp_modify_page_title', 'my_page_title', 10); add_filter('bbp_title', 'my_page_title'); function my_page_title( $title) { return $title.' ' .get_bloginfo( 'name', 'display' ); }
May 3, 2015 at 06:59 #57092Reflect GrowthParticipant@bradh – thank you mate! You’re a legend. Can’t believe that I was just one character off with the filter name – doh!!
@Andrei – Just to clarify I’m not using the Yoast plugin. The above filter’s correct the behaviour I was seeing 🙂Once again big thanks to @bradh! Tried, tested & working like a charm!
May 6, 2015 at 06:18 #57551Reflect GrowthParticipantJust updating this thread to “Unresolved” as the fix does not apply to forums in bbPress. It seems that if you navigate to a topic the fix works, but if you look at the page title for a forum just a list of tags is shown for the page title.
Any thoughts on this aspect of the issue? @bradh / @Andrei
I’ll investigate this further shortly.
May 6, 2015 at 17:37 #57599AndreiModeratorCan you please post a list with the plugins that you’re using ?
Looking forward.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMay 8, 2015 at 04:59 #57919AndreiModeratorI don’t manage to think of anything from that list that might cause issue, probably the code that you’re applied for fixing buddypress titles has made another problems with bbpress. We’re planning an update around the middle of this month so I’ll put this issue on our testing list to be sure everything will work just fine.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMay 8, 2015 at 05:10 #57923Reflect GrowthParticipantThanks @Andrei I will update the thread if I find anything further myself. It feels as though it may just be another filter that needs to be applied for forum page titles specifically, but that seems a bit over the top.
I’m certain this was all working fine initially, as the historic google indexes were showing the right page titles. Sounds like something has snuck in under the radar.
Would be worth flagging the WordPress change re: page title support in case that has in some way affected the theme to 🙂 This article outlines the change introduced in WordPress 4.1:
http://wptavern.com/wordpress-4-1-to-introduce-theme-support-for-the-title-tag
May 8, 2015 at 05:26 #57927AndreiModeratorWe already integrated this and worked without problem. The issue mainly comes from additional plugins, but as I’ve said, we’ll give it a test on a fresh install and see if everything works as it should or if is something to be fixed from our side.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMay 8, 2015 at 05:29 #57928Reflect GrowthParticipant@Andrei my apologies I didn’t know you’d already tested with that change 🙂 Thanks for your help.
May 8, 2015 at 05:52 #57932AndreiModeratorNo problem, I’m glad I could help you with some infos.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.