I have a client running a Christmas campaign, predominately on social media but with news posts and some duplicate copy into CGBlog (which I use as their recipe section). I would prefer the recipe content rank.
To avoid duplicate content penalties, I assign the extra field as a variable in the News detail template, and added
Code: Select all
{if isset($canonical)}<link rel='canonical' href='{if ! empty($extra)}{$extra}{else}{$canonical}{/if}'/>{elseif isset($content_obj)}<link rel='canonical' href='{$content_obj->GetURL()}'/>{/if}
Seems to work, but I'm wondering if this is the best way to do this?
Thanks for any advice. My client has taken a one day Google course - and a little knowledge is a very dangerous thing!
Cheers,
Paul