Native Joomla canonical link injection

  • Posts: 19
  • Thank you received: 0
5 years 2 weeks ago #318196

Hikiashop uses not 100% logic code to add canonical URLs:

$doc->addCustomTag( '<link rel="canonical" href="'.$canonicalUrl.'" />' );

The correct way is to use the addHeadLink() method:
$doc->addHeadLink($canonicalUrl, 'canonical');

Please Log in or Create an account to join the conversation.

  • Posts: 83799
  • Thank you received: 13571
  • MODERATOR
5 years 2 weeks ago #318201

Hi,

Thank you for your feedback. We'll look at changing this.

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum