WordPress.org

Forums

WordPress SEO by Yoast
How To Manually Remove WordPress SEO on Template Page (5 posts)

  1. PageWood
    Member
    Posted 2 years ago #

    I'm running a Real Estate website with IDX Broker Platinum and WordPress SEO. I had to create a dynamic wrapper template that IDX Broker wraps the listings with. That means that the Wrapper pulls all of the SEO data from the template page for each real estate listing.

    This causes big issues, as I don't want to include the wrapper in my site map or have search engines index it. If I set the wrapper to no follow, then all of my real estate listings are set to no follow as well. When I post a listing to Facebook, the open graph data doesn't pull the meta from the listing, but instead what Yoast SEO embeds for the wrapper page on my site.

    Basically, I need to know how to disable Yoast SEO on a particular page template. Anyone know how to do this?

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

  2. kutu62
    Member
    Posted 2 years ago #

    That would be awesome! Did you figure this out? I need help too!

  3. kutu62
    Member
    Posted 2 years ago #

    Adding the below code to header-diff.php should have removed canonical from my custom pages. But it didn't.. Any help?

    <?php add_filter( $wpseo_canonical, __return_false ); ?>

    Reference:

    http://codex.wordpress.org/Function_Reference/add_filter
    and
    http://yoast.com/wordpress-seo-api-docs/

    Any help Yoast, Joost de Valk

  4. kutu62
    Member
    Posted 2 years ago #

    Here's how to remove canonical for custom pages!

    <?php add_filter( 'wpseo_canonical', '__return_false' ); ?>

    Works!

  5. PageWood
    Member
    Posted 1 year ago #

    Hey there Kutu, just now got back around to checking out this thread. Does that option still work for you?

    I just went to test it for fun with no such luck. Also tried...

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress SEO by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic