Wordpress auto-generated "canonical" link - get them to use a custom URL parameter?
Posted
by kiko
on Stack Overflow
See other posts from Stack Overflow
or by kiko
Published on 2010-03-12T05:09:56Z
Indexed on
2010/03/12
6:37 UTC
Read the original article
Hit count: 212
Hello -
Does anyone know how to modify the Wordpress canonical links to add a custom URL parameter?
I have a Wordpress site with a page that queries a separate (non-Wordpress) database. I passed the URL parameter "pubID" to display individual books and it is working OK.
Example: http://www.uglyducklingpresse.org/catalog/browse/item/?pubID=63
But the individual books are not showing up properly in Google - the ?pubID parameter is stripped out.
I think maybe this is because all the item pages have the same auto-generated "canonical" URL link tag in the source - one with the "pubID" parameter stripped out.
Example: link rel='canonical' href='http://www.uglyducklingpresse.org/catalog/browse/item/'
Is there a way to perhaps edit .htaccess to add a custom URL parameter to Wordpress, so that the parameter is not stripped out by permalinks and the "canonical" links?
Or maybe there's another solution ... Thank you for any ideas!
© Stack Overflow or respective owner