Support » Plugin: Yoast SEO » remove rel="canonical" URL for pages of specified template

  • Hey Joost,

    Thanks for this kick ass plugin! I have a very obscure request, and I will try to explain my rationality.

    I have a need to remove the rel=”canonical” for pages that use a specific template. I was able to achieve this in my genesis child theme, by adding this to a template called listings.php:

    Template Name: listings
    remove_action( 'wp_head', 'genesis_canonical' );

    however I would really like to use your plugin. Is it possible to hook into your plugin to do the same.

    My reasoning:

    I am integrating a 3rd party real estate service from Dakno Marketing–they are great and would refer them to anyone interested in indexable IDX with rational property URLS and title tags. The service resides in a subdomain of your site (I know I wanted a subfolder instead, but didn’t have the option!).

    The way that Dakno mimics the style of your site is by having you create a page that you will not link to — something obscure just for the sake of a small [short_code] that they provide you with. It’s not exclusive for WordPress, but looks exactly like a WP shortcode. Anyway, the problem is that the service creates a wrapper of your code and then inserts the search page, listings page, and single property page into the content area. Unfortunately the rel=”canonical” is left the same for every page it creates. And what’s worse is that its pointing to the dummy page we’re trying to keep out of the index. So 1000s of pages are telling google that this dummy page is the source, pretty much negating any hard work we’ve done using their service.

    Like I said, I was able to fix the problem by removing the action on the genesis child theme, and wanted to know if i could just as easily do so with your plugin installed.

    Thanks again for all the hard work. You have my thanks via donation coming right after i hit post!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t think, that this is a obscure request. I nearly asked the same:

    I’m no plugin-programming-crack but having the code to remove the canonical entry on a page-template base would be great.

    The best solution would of course be an option in the SEO-setting of a post and page to remove the canonical entry for that specific post or page.

    Glad to see someone else has this request, hopefully we can get it in a future release. I unfortunately need to move forward, and I think Joost might be on vacation or something, as I havent seen him online for a few days.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘remove rel="canonical" URL for pages of specified template’ is closed to new replies.