Support Forums - Classified Ads Script Osclass
General osclass questions => General discussion => Topic started by: webcity on December 07, 2020, 03:07:31 PM
-
Hi,
Thanks for the osclass v4.2.0 update.
When I go to: https://demo.osclasspoint.com/for-sale/2 which is page 2 of the "for sale" category it shows the following canonical:
<link rel="canonical" href="https://demo.osclasspoint.com/for-sale"/>
It should be <link rel="canonical" href="https://demo.osclasspoint.com/for-sale/2"/>
Can you suggest a solution?
Many thanks
-
@webcity
I do not think pagination should be considered in canonical URLs, you may find canonical URL generation in oc-includes/osclass/controller/search.php and modify it by your needs.
if( Params::getParam('iPage') > 1 ) {
$this->_exportVariableToView('canonical', osc_base_url() . $search_uri);
}