How can I hide specific vendor names on my website's front page?

Hi all,

I am using Dawn theme (2.3.0) for my website under works.

With Shopify you have to have a vendor listed on any product page. (Can’t be left blank).

On my front page I have a featured collection and have selected that vendor names be shown there. It shows all vendor names, however I am wanting to hide select vendor names from showing (products which have e.g. my store name as the vendor, or “xyz”).

Is there a way to edit the theme code to allow for an exception if vendor is shop name or ‘xyz’ for it to not show on the page/blank? I don’t want to remove all vendor names, only those that have the vendor listed as the shop name as an example.

I appreciate any help with this.

1 Like

@ssammyyo - 2 options -

1- using css , which is very easy and will need page link where you have vendor name

2- we edit the code which needs code editing

@ssammyyo so you don’t want to sow the “XYZ” vendor products correct?

1 Like

@ErSanjay Correct. I want to be able to show all vendors within the featured product collection section on my main page except for the products which vendors are “xyz” - those with “xyz” vendor I don’t want to show the vendor name.

@ssammyyo i hope you know the liquid and coding stuff

you have to just add one condition to hide that vendor product

here is my code referee that worked for all themes you have to put the code at the right location

{%- for product in section.settings.collection.products limit: section.settings.products_to_show -%}
       
{% if product.vendor != "xyz" %}   
        - {% render 'card-product',
                card_product: product,
                media_aspect_ratio: section.settings.image_ratio,
                show_secondary_image: section.settings.show_secondary_image,
                show_vendor: section.settings.show_vendor,
                show_rating: section.settings.show_rating
              %}
          

          {% endif %}

{% endfor %}

just add the if condition

{% if product.vendor != "xyz" %}   

your code block here
 
{% endif %}

@ssammyyo

Hi, you just need custom code and customize your theme. Need css using for more better result. If you able to do that u can easily do it