Remove a specific vendor from vendor list

Topic summary

A user needed to exclude a specific vendor from a dynamically generated vendor list created using Liquid code in their store.

Solution Provided:
The Store Watchers Support Team suggested adding a conditional statement using {%- if product_vendor != 'VendorToBeRemoved' -%} within the loop to skip the unwanted vendor. The original poster confirmed this solution worked.

Follow-up Questions (Unresolved):

  • How to filter the vendor list by product type (either including only certain types or excluding specific ones)
  • How to hide multiple vendors simultaneously

The discussion remains open with these additional filtering questions awaiting responses.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I have created a page with a vendor list using this code i found on here

    {%- for product_vendor in shop.vendors -%}
  • {{ product_vendor | link_to_vendor }}
  • {%- endfor -%}

I need to remove one vendor from this list using code.

Can someone advise please?

Hi, @slimmyjimmy

Greetings from the Store Watchers Support Team! Happy to help you today.

Certainly! To remove a specific vendor from your vendor list using code, you can modify the code you provided. Here’s an example of how you can achieve this:

{%- for product_vendor in shop.vendors -%}
   {%- if product_vendor != 'VendorToBeRemoved' -%}
       {{ product_vendor | link_to_vendor }}
   {%- endif -%}
{%- endfor -%}

In the code above, replace ‘VendorToBeRemoved’ with the exact name of the vendor you wish to exclude from the list. This code snippet checks each vendor in the loop and only generates an
element if the vendor name is not ‘VendorToBeRemoved’. This way, the specified vendor will be skipped in the list. Simply insert this modified code into your page, and the vendor you want to remove will no longer be displayed in the list.

Let me know if need further assistance.

Regards,
Store Watchers Support Team

that worked! thanks!

Would you happen to know how I could filter the vendor list by product type?

Say I only wanted to include vendors of a certain product type. Or exclude a certain product type if that is easier.

Hi there, if I wanted to hide multiple vendors how would I go about doing that?