How to edit the head tag of an individual page?

James_Davidson
Visitor
2 0 0

Hi,

 

How do you edit an individual page’s head tag? 

All the advice is on how to edit the theme tag?

Replies 3 (3)

webwondersco
Shopify Partner
1103 164 162

@James_Davidson hope you are doing well.

 

You can use the if condition to render the head tags based on a page template. Please check the example below

 

{% if template.suffix == 'index' %}
  This is the homepage template.
{% endif %}

{% if template.suffix == 'product' %}
  This is the product page template.
{% endif %}

{%if template.suffix == 'cart' %}
Cart page
{% endif %}
Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram

JoshHighland
Shopify Expert
207 12 73

Im interested in the case where you need to adjust the code in each pages head? Are you trying to manage your meta information?

SEO Manager - The FREE all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -
James_Davidson
Visitor
2 0 0
I’m trying to add a canonical tag to a product variant that requires a separate page.

Thanks