Support » Plugin: Yoast SEO » Yoast BuddyPress = All forum posts and members share a canonical tag

  • Setup: Latest WP (3.5.1) + BuddyPress + Yoast’s WordPress SEO plugin + Woothemes.

    The issue: The cannonical URLs of almost all BP pages are showing as the ‘home’ URL for that function, for example:
    domain.com/members/ and
    domain.com/members/admin/
    both show the cannonical URL domain.com/members/

    The same goes for domain.com/groups … every single group, forum, topic, subpage ALL show the cannonical link as domain.com/groups or /members, etc.

    for example: indietravelpodcast.com/groups/oceania-travel/forum/topic/van-recommendations-for-australia/

    Shows:

    <!-- This site is optimized with the Yoast WordPress SEO plugin v1.3.4.4 - http://yoast.com/wordpress/seo/ -->
    <!-- Admin only notice: this page doesn't show a meta description because it doesn't have one, either write it for this page specifically or go into the SEO -> Titles menu and set up a template. -->
    <link rel="canonical" href="http://indietravelpodcast.com/groups/" />
    <meta name="robots" content="noodp,noydir"/>
    <link rel="author" href="https://plus.google.com/108416784493266670455/"/>
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@indietravel">
    <meta name="twitter:description" content="">
    <meta name="twitter:title" content="Groups | Indie Travel Podcast">
    <meta name="twitter:url" content="http://indietravelpodcast.com/groups/">
    <!-- / Yoast WordPress SEO plugin. -->

    My header reads:

    <!-- titles updated for BP/Yoast compatibility -->
    <?php if(!bp_is_blog_page() ){ ?>
    	 <title><?php bp_page_title() ?></title>
    <?php } else { ?>
    	<title><?php woo_title( '' ); ?></title>
    <?php } ?>

    But the !bp_is_blog_page isn’t doing anything helpful here, as some other forum commenters claimed it might.

    This is obviously a major issue for search and for machine-readability in general. What’s the deal, and what’s the fix?

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you manage to find a solution to this at all?

    I’ve got the same problem. Did you resolved it?

    YES! I found how to fix it! 🙂
    You need add this to your theme function.php:

    function wpseo_canonical_exclude( $canonical )
    {
    		global $bp;
    		if ( $bp->current_component)
                    {
       		$canonical = false;
                     }
    	return $canonical;
    }
    add_filter( 'wpseo_canonical', 'wpseo_canonical_exclude' );

    Maybe it’s not really nice solution, but it works, members, groups and forums will not share a canonical slug anymore.
    I’m using this at my website http://sevelina.ru/

    This is nice, but it completely strips the canonical URL. Can it be modified to include each individual member’s username in the canonical URL?

    This also strips the og tag of a URL.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Yoast BuddyPress = All forum posts and members share a canonical tag’ is closed to new replies.