-
OlivierSn
Hello,
I have a problem with pagination with it creates duplicate content.The link of page N°1 is in the pagination :
/categorie-produit/bac-a-shampooing/page/1/But the destination is this one, which is the right one:
/categorie-produit/bac-a-shampooing/This creates duplicate content!
How can I resolve this?
Thanks for your help
Olivier
-
Alvind
Hi there,
When you visit this link: “/categorie-produit/bac-a-shampooing/page/1/”, does it redirect or display the correct page for page 1? If it’s not redirects, that shouldn’t happen.
-
OlivierSn
Hi
There’s no redirection, it’s just the N°1 link that displays /page/1/ when it should be /Ex. https://gammabrossfrance.fr/categorie-produit/comptoir-reception/page/2/
-
Alvind
When I access this link:
https://gammabrossfrance.fr/categorie-produit/comptoir-reception/page/1/It redirected to: https://gammabrossfrance.fr/categorie-produit/comptoir-reception/
That’s how it supposed to work, right?
-
OlivierSn
No
The link of block N°1 must be : https://gammabrossfrance.fr/categorie-produit/comptoir-reception/ -
David
Hi there,
I am not sure it will work with Woocommerce, but you could try the
paginate_links
hook that WordPRess provides.Here’s a PHP Snipett to string replace the
/page/1
to just a/
:add_filter( 'paginate_links', function($link){ if(is_paged()){$link= str_replace('page/1/', '', $link);} return $link; } );
-
OlivierSn
Hi David
Master David ^^Perfect ! It works !
Have a nice day 🙂
-
David
Awesome – glad tp be of help
- You must be logged in to reply to this topic.