Native Joomla canonical link injection

  • Posts: 13
  • Thank you received: 0
4 years 6 months 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: 82867
  • Thank you received: 13373
  • MODERATOR
4 years 6 months 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.049 seconds
Powered by Kunena Forum