Home > Shopify Development > Liquid Highlight in Shopify

Liquid Highlight in Shopify

Mike Updated: August 29, 2023


Drive 20-40% of your revenue with Avada
avada email marketing

Filters in Shopify are known as one of the simplest methods to change the output of strings, numbers, objects, and variables. In fact, filters are put in an output tag {{ }} and devoted by a pipe character |.

Additional Filters in Shopify are also general filters that can serve lots of various purposes, containing converting, formatting, and applying CSS classes. Additional Filters is packed with date, default, format_address, highlight, json, placeholder_svg_tag, and weight_with_unit

In this post, you will be introduced on highlight in Shopify.

Additional filters


You should take note that the highlight is used to wrap words inside the search results with an HTML <strong> tag, along with the highlight class if it can match search.terms.


{{ item.content | highlight: search.terms }}


<!-- If the search term was "Yellow" -->
<strong class="highlight">Yellow</strong> shirts are the best!


The highlight_active_tag can wrap tag links in <span>; followed by the class active if those tags are used to get collections filtered.


<!-- collection.tags = ["Cotton", "Crew Neck", "Jersey"] -->
{% for tag in collection.tags %}
    {{ tag | highlight_active | link_to_tag: tag }}
{% endfor %}


<a title="Show products matching tag Cotton" href="/collections/all/cotton"><span class="active">Cotton</span></a>
<a title="Show products matching tag Crew Neck" href="/collections/all/crew-neck">Crew Neck</a>
<a title="Show products matching tag Jersey" href="/collections/all/jersey">Jersey</a>


After reading this review, we hope that you can have an understanding about additional filters in general and highlight in particularly in Shopify.

Mike is a content writer at Avada, with a love for video games, gadgets, and software. He has been writing about the industry now for over 7 years. He likes to keep up-to-date with the latest software releases. He's also an avid reader, and he enjoys spending time outdoors with family and friends. When he's not working, you can usually find him playing video games or exploring new outdoor activities.

Stay in the know

Get special offers on the latest news from AVADA.