Filter canonical urls
-
Hi,
I’m using your plugin for maybe 10 years or something, I don’t really remember and enjoy it a lot.
Anyway, it’s perfect as long as you don’t have to change any value. I ran into an issue today and had to filter the canonical url.
So, I added this line :
$link = apply_filters( ‘su_canonical_url_filter’, $link );On line 169, file seo-ultimate/modules/canonical/canonical.php
Context :
###################################################
//Handle protocol change
if ($scheme = $this->get_setting(‘canonical_url_scheme’, ‘http’))
$link = preg_replace(‘@^https?://@’, “$scheme://”, $link);$link = apply_filters( ‘su_canonical_url_filter’, $link );
//Return the canonical URL
return $link;
###################################################This enables me to fix some broken links.
Is it possible to add this in next update? I think it could help some other people. If you have a github, I could push myself this commit (and maybe some more filters).
Thanks,
Tanguy
- The topic ‘Filter canonical urls’ is closed to new replies.