This topic has 23 replies, 4 voices, and was last updated 10 years by Andrei.

  • Author
  • #53370
     Reflect Growth
    Participant

    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 CODE
    if ( ! 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?

    #53371
     Reflect Growth
    Participant

    ### Begin System Info ###

    — Site Info

    Site URL: http://www.reflectgrowth.com/co-create
    Home URL: http://www.reflectgrowth.com/co-create
    Multisite: No

    — User Browser

    Platform: Windows
    Browser Name: Chrome
    Browser Version: 41.0.2272.118
    User Agent String: Mozilla/5.0 (Windows NT 6.3; WOW
    64) AppleWebKit/537.36 (KHTML, l
    ike Gecko) Chrome/41.0.2272.118
    Safari/537.36

    — WordPress Configuration

    Version: 4.1.1
    Permalink Structure: /blog/%postname%/
    Active Theme: Kleo Child (child theme)
    Parent Theme: Kleo 2.4.1
    Show On Front: page
    Page On Front: Home (#328)
    Page For Posts: Blog (#387)
    Remote Post: wp_remote_post() works
    Table Prefix: Length: 3 Status: Acceptable
    WP_DEBUG: Disabled
    Memory Limit: 128M

    — WordPress Active Plugins

    Add Meta Tags: 2.7.1
    All-in-One WP Migration: 3.2.2
    BAW Post Views Count: 2.19.11
    bbPress: 2.5.6
    bbPress – Private Replies: 1.3.2
    bbPress – Report Content: 1.0.5
    BuddyPress: 2.2.1
    BuddyPress Cover Photo: 1.0.5
    Contact Form 7: 4.1.1
    Content Restriction for BuddyPress Groups: 1.0
    Easy Google Fonts: 1.3.6
    Export Users to CSV: 1.0.0
    Google XML Sitemaps: 4.0.8
    Growmap Anti Spambot Plugin: 1.5.6
    Import users from CSV with meta: 1.2.1
    K Elements: 2.4
    myCRED: 1.6.2
    Regenerate Thumbnails: 2.2.4
    Revolution Slider: 4.6.5
    rtMedia for WordPress, BuddyPress and bbPress: 3.7.35
    Social Articles: 1.8
    Social Polls by Wedgies.com: 1.3
    Subscribe to Comments Reloaded: 150207
    Taxonomy Metadata: 0.4
    User Switching: 1.0.4
    W3 Total Cache: 0.9.4.1
    WooCommerce: 2.3.7
    WooCommerce Colors: 1.0.6
    WordPress Backup to Dropbox: 4.1
    Wordpress Firewall 2: 1.3
    Wordpress Social Invitations: 2.5
    WPBakery Visual Composer: 4.3.5
    WP Better Emails: 0.2.8
    WP Feedback, Survey & Quiz Manager – Pro: 2.5.3
    YITH WooCommerce Wishlist: 2.0.5

    — WordPress Inactive Plugins

    Akismet: 3.1.1
    Paid Memberships Pro: 1.8.2.2

    — Webserver Configuration

    PHP Version: 5.4.39
    MySQL Version: 50542
    Webserver Info: Apache

    — PHP Configuration

    Safe Mode: No
    Memory Limit: 256M
    Upload Max Size: 50M
    Post Max Size: 50M
    Upload Max Filesize: 50M
    Time Limit: 0
    Max Input Vars: 1000
    Display Errors: N/A

    — PHP Extensions

    cURL: Supported
    fsockopen: Supported
    SOAP Client: Installed
    Suhosin: Not Installed

    — Session Configuration

    Session: Enabled
    Session Name: PHPSESSID
    Cookie Path: /
    Save Path: /tmp
    Use Cookies: On
    Use Only Cookies: On

    ### End System Info ###

    #53793
     Brunoexpress
    Participant

    Hi,

    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?

    #53985
     Reflect Growth
    Participant

    Looking 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.

    #54549
     Reflect Growth
    Participant

    I’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?

    #54550
     Reflect Growth
    Participant

    These 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 🙂

    #54649
     Andrei
    Moderator

    This 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.
    Cheers

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

    Thanks 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.

    #56370
     Andrei
    Moderator

    Hi,

    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 solution
    #56552
     bradh
    Participant

    I am encountering this problem but do not have the Yoast (or any) SEO plugin. Any idea what this could be?

    #56554
     bradh
    Participant

    I should note that I am only having issues with bbPress.

    #57008
     bradh
    Participant

    An 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.

    #57071
     bradh
    Participant

    Reflect 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.
    }
    #57072
     bradh
    Participant

    Sorry, 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.
    }
    #57074
     bradh
    Participant

    Reflect 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' );
    }
    #57092
     Reflect Growth
    Participant

    @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!

    #57551
     Reflect Growth
    Participant

    Just 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.

    #57599
     Andrei
    Moderator

    Can 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 solution
    #57667
     Reflect Growth
    Participant

    @Andrei – I’ve provided an updated list of plugins below. As I will have updated most of them since my original post (where I’d included my “system info” from the theme options area).

    — WordPress Active Plugins

    Add Meta Tags: 2.8.3
    BAW Post Views Count: 2.19.11
    bbPress: 2.5.7
    bbPress – Private Replies: 1.3.2
    bbPress – Report Content: 1.0.5
    BuddyPress: 2.2.3.1
    BuddyPress Cover Photo: 1.0.5
    Contact Form 7: 4.1.2
    Content Restriction for BuddyPress Groups: 1.0
    Easy Google Fonts: 1.3.6
    Export Users to CSV: 1.0.0
    Google XML Sitemaps: 4.0.8
    Growmap Anti Spambot Plugin: 1.5.6
    Import users from CSV with meta: 1.3
    K Elements: 2.4
    myCRED: 1.6.3
    Regenerate Thumbnails: 2.2.4
    Revolution Slider: 4.6.5
    rtMedia for WordPress, BuddyPress and bbPress: 3.7.41
    Social Articles: 1.8
    Social Polls by Wedgies.com: 1.3.1
    Subscribe to Comments Reloaded: 150422
    Taxonomy Metadata: 0.4
    UpdraftPlus – Backup/Restore: 1.9.64
    User Switching: 1.0.5
    W3 Total Cache: 0.9.4.1
    WooCommerce: 2.3.8
    WooCommerce Colors: 1.0.6
    Wordpress Firewall 2: 1.3
    Wordpress Social Invitations: 2.5
    WPBakery Visual Composer: 4.3.5
    WP Better Emails: 0.2.8
    WP Feedback, Survey & Quiz Manager – Pro: 2.5.3
    YITH WooCommerce Wishlist: 2.0.7

    — WordPress Inactive Plugins

    Akismet: 3.1.1
    Paid Memberships Pro: 1.8.3.1

    #57919
     Andrei
    Moderator

    I 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 solution
    #57923
     Reflect Growth
    Participant

    Thanks @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

    #57927
     Andrei
    Moderator

    We 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 solution
    #57928
     Reflect Growth
    Participant

    @Andrei my apologies I didn’t know you’d already tested with that change 🙂 Thanks for your help.

    #57932
     Andrei
    Moderator

    No 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
Viewing 24 posts - 1 through 24 (of 24 total)

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

Log in with your credentials

Forgot your details?