AVADA logo
Published on

Liquid Highlight in Shopify

257 words2 min read
  • Name

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

Highlight {#highlight}

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!

Highlight_active-tag {#highlight-active-tag}

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.

Don't have a Shopify store?

Get your free trial here -->x

Exclusive Offer: Shopify Deal for PageFly Audience

Start Your Online Business with Shopify 12 Day Free Trial + Pay Only 1$ For Your First Month