Items with no variant showing Default Title Dropdown

All of my items without variants are showing a dropdown with “Default Title”. How do I remove this?

Using the Supply Theme

Hello @MTNOffroadFab ,

Welcome to Shopify community!

To hide “Default title” variant dropdown you have to make some customization to your theme if you are comfortable doing it (or DM me our team can do it for free for you)

Step 1: From your Shopify admin, go to Online Store > Themes > Edit Code

Step 2: Find the file named product-template.liquid or product.liquid. The exact file can vary, but typically product-template.liquid is the right one in the Supply theme.

Step 3: Look for the code that handles the variants dropdown. It usually includes a loop, example code :

{% if product.variants.size > 1 %}
  
{% else %}
  
{% endif %}

Step 4: Modify the Code

{% if product.has_only_default_variant %}
  
{% else %}
  
  
{% endif %}

Step 5: Save the changes and see theme preview.

What we did?

  • The condition {% if product.has_only_default_variant %} checks if the product only has the default variant.
  • If true, it hides the dropdown and sets the variant ID in a hidden input.
  • If false, it displays the dropdown for selecting variants.

If you still have any questions feel free to reach out.


I tried adding the code here and it worked on the items with no variants but it broke the other items with variants

Hello @MTNOffroadFab ,

Thank you for your reply.

Please try updated code :

{% if product.has_only_default_variant %}
  
{% else %}
  
{% endif %}

If it still doesn’t solve the issue, feel free to revert back.

That worked great! Thanks.

Glad to help :slightly_smiling_face: