Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I am trying to implement Google's Pagination with rel=“next” and rel=“prev” and am following the instructions from this post on the subject.
I just want to clarify exactly what code Caroline is talking about when she writes this in her last comment:
place the paginate tag {% paginate X by Y %} ... in theme.liquid inside the <head>
I understand that the "paginate tag" she mentions plus this code:
{% if paginate.previous %} <link rel="prev" href="{{ shop.url }}{{ paginate.previous.url }}" /> {% endif %} {% if paginate.next %} <link rel="next" href="{{ shop.url }}{{ paginate.next.url }}" /> {% endif %}
needs to be placed in the in theme.liquid inside the <head> tag for it to work.
Thanks,
Hannah
As far as I understand it's not possible to place the paginate block within the head in theme.liquid. So you'll need to forgive me for suggesting to do that. In conclusion, you won't be able to add prev and next links to your collection pages.
Caroline_Schnap | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hello Caroline,
Now, is it possible to add tag rel="prev" and rel="next" in the head of a shopify website, for collection page pagination ?
I tried to do that as defined in the chapter "pagination markup" in the following link : https://www.digitaldarts.com.au/expert-guide-shopify-seo-tips#audit-site-architecture
But it does not work for me, I think so.
Thanks in advance for your help, best regards
@Maelb22 You've linked to one our SEO guides in your post. There's nothing you need to do to implement rel next and rel prev canonical tags on collection pages because the mark up is handled through {{ content_for_header }}.
There's a tiny chance your theme is different so it may help to post a collection URL here to be analyzed.
Hello Josh,
Thanks for the response. Effectively, everything is correct. I was analysed the code in a wrong way.
Have a great day,
Maël
User | RANK |
---|---|
6 | |
5 | |
5 | |
5 | |
4 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By