Hello. I am having a coding issue. My size chart link should only show on the product page of my hoodies, tshirts, sweatshirts and jackets but it is showing on all my product pages

Topic summary

A store owner reports that a “size chart” link is appearing on every product page, but it should only display on product pages for hoodies, T‑shirts, sweatshirts, and jackets.

  • Evidence provided consists solely of two screenshots; no code or theme files are shown. Images are central to understanding the exact placement/behavior.
  • The issue is categorized under Store Design with tags suggesting theme customization involving HTML/JavaScript.
  • No guidance, fixes, or alternative approaches have been offered yet; there are no follow‑up posts or decisions. The thread remains open.

Key unknowns preventing resolution:

  • How the visibility condition is currently implemented (e.g., by product type, tags, collections, or template).
  • Where the link is injected (theme section/snippet, app block, or a global script).
  • Whether different templates or conditional logic are applied to the specified product categories.

Next steps likely require sharing the relevant theme code or conditions controlling when the link renders.

Summarized with AI on January 4. AI used: gpt-5.

Hi, Your code looks like has nothing relates to your chart.

could be somewhere else.

1 Like

So, are you saying that the code for my “View Size Chart” looks correct? and that there may be an issue with coding in a different location?

I messaged you. This is new for me. Is it normal to give access? I am hesitant in do so. So much going on these days.

I do appreciate your willingness to help though.

Hey, here also.
The answer is no, unless you trust people to do that. but you could remove people from access later.

Hi @nlamanstrms74 :waving_hand: Just use alternate templates to have different theme features active for different products.
https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-template

There should be no reason to provide store access for this unless the theme specifically has no way to disable size charts etc at the template level.
In which case an advanced theme customization may be required.

Also just search first it’s the rules and in general just wastes your time and others time by not doing so
add your theme name to the keywords
https://community.shopify.com/search?q=hide+size+chart

In communications do no rely solely on images for the description, shoving everything into the title is a bad habit.
Explain the problem in text in the description THEN images even if you’ve overstuffed the title.

2 Likes

Hey @nlamanstrms74!

Thanks for posting your Query on this forum.

The reason why you seeing the size chart on all of the product pages, because you didn’t assign the templates.

The best approach is that you need to first create the templates and then you need to assign the products per collections.

For that you need to follow these steps.

Go to Shopify Admin >> Online Store >> Edit theme >> Click on Home from the top >> Click on Products >> Create a new template.

Once you create the template then you need to go each product and assign the template.

Once you finish with all this kind of stuff then you need to add to Size Chat block where you want to show it.

Hope this helps.

1 Like

Hi @nlamanstrms74

You could try to debug that issue by printing each condition and seeing if you get the value you expect.

product_type: {{ product.productType | json }}<br>
apparel_types: {{ apparel_types | json }}<br>
block.settings.chart: {{ block.settings.chart | json }} <br>

{% if apparel_types contains product.productType %}
  MATCH = true
{% else %}
  MATCH = false
{% endif %}

But to me, that product type looks off if it is not some custom-defined property. So should be:

{{ product.type }}

1 Like

Agree with @PaulNewton This is the reason you can create and assign templates in Shopify. So you can display one thing for a certain set of products, and display something else for a different set of products.

1 Like

I just checked his file.

1.His case is put the code in the wrong loop, he put the code under a “text” sections rendering’s switch.
2.Should use product.type instead.
3.Also, need to read the block.settings.chart_id under the variant_picker then make a global variable for later/outside the loop render.

1 Like

To better spell what’s already said – there is no product.productType, there is product.type, see Liquid objects: product
This is the reason why your code does not work.

1 Like

Hi @nlamanstrms74 :raising_hands:

If the Size Chart link appears on all product pages, it becomes quite difficult to control its display by product type. Meanwhile, only certain products such as hoodies, T-shirts, sweatshirts, or jackets actually need a size chart, so showing it on other products makes the interface cluttered and unnecessary. With Easify Product Options, you can handle this easily without modifying the theme code.

Here’s an example I’ve created so you can see how it works:

  • This is the result:

  • This is the app setting:

You just need to create the size chart as a modal (popup) and assign this option to the products that need to display a size chart. That way, the “Show size chart” link will only appear on the relevant product pages, while products that don’t need sizing information won’t show it anymore.

Additionally, in the Advanced settings of the modal option, you can further customize the display experience - for example, by adding an icon or image to the modal, adjusting the icon/image size, and fine-tuning fonts and colors to match your store’s design. As a result, the “Show size chart” will look like a clean button or inline link right on the product page, instead of opening a separate page as it does now.

This approach helps keep your product pages cleaner and more user-friendly, while giving you full control over how the size chart is displayed for each product.

Easify makes customization effortless - it’s simple to set up and works flawlessly for personalized products. Their support team is also amazing if you need any guidance!:smiling_face_with_three_hearts:

1 Like

I do like this because our customers can stay on the actual product page to see the size chart. Thank you for your help!