Support Forums - Classified Ads Script Osclass

Osclass theme support => Free themes => Patricia Osclass Responsive Theme => Topic started by: abogoud on June 30, 2016, 01:30:06 PM

Title: support url canonical
Post by: abogoud on June 30, 2016, 01:30:06 PM
hello

check the head.php

Code: [Select]
<?php if( osc_get_canonical() != '' ) { ?>
  <link rel="canonical" href="<?php echo osc_get_canonical(); ?>"/>
<?php ?>

Replace

Code: [Select]
  <link rel="canonical" href="<?php echo osc_get_canonical(); ?>"/>
thanks
Title: Re: support url canonical
Post by: MB Themes on June 30, 2016, 01:49:54 PM
@abogoud
Thanks for your tip, but actually if cannonical URL is empty, it would not be shown and I do not see reason to show empty URL...
Title: Re: support url canonical
Post by: abogoud on June 30, 2016, 04:20:48 PM
Hello

Replace this will work fine

Code: [Select]
<link rel="canonical" href="<?php echo 'http://' $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"/>