Skip to content

Filters

Every Liquid filter a Sooquna theme can use, by category.

Name Summary
append Adds a string to the end.
capitalize Upper-cases the first character, lower-cases the rest.
default A fallback for nil, false or empty values.
downcase Lower-cases a string.
inspect Shows a value as JSON-like text, for debugging.
lstrip Removes whitespace at the start.
prepend Adds a string to the start.
remove Removes every occurrence of a string.
remove_first Removes the first occurrence of a string.
remove_last Removes the last occurrence of a string.
replace Replaces every occurrence of a string.
replace_first Replaces the first occurrence of a string.
replace_last Replaces the last occurrence of a string.
rstrip Removes whitespace at the end.
size Number of characters in a string or items in an array.
slice Part of a string or array, from an index and a length.
split Splits a string into an array.
strip Removes whitespace at both ends.
strip_newlines Removes line breaks.
truncate Shortens a string to a number of characters.
truncatewords Shortens a string to a number of words.
type The type of a value (string, int, array…), for debugging.
upcase Upper-cases a string.
Name Summary
abs Absolute value.
at_least Limits a number to a minimum.
at_most Limits a number to a maximum.
ceil Rounds up to an integer.
divided_by Divides by a number.
floor Rounds down to an integer.
minus Subtracts a number.
modulo Remainder of a division.
plus Adds a number.
round Rounds to a number of decimals (default 0).
times Multiplies by a number.
Name Summary
compact Removes nil items.
concat Joins two arrays.
first First item of an array.
join Joins array items with a separator (default a space).
last Last item of an array.
map Takes one property from every item.
reverse Reverses an array.
sort Sorts an array, case-sensitively; by a property when given.
sort_natural Sorts an array case-insensitively; by a property when given.
sum Adds up numbers in an array, or a property of its items.
uniq Removes duplicate items.
where Items whose property equals a value (or is truthy, without a value).
Name Summary
default_pagination Pagination links for a paginate block.
escape Escapes HTML characters.
escape_once Escapes HTML without escaping existing entities twice.
format_address An address as HTML lines.
highlight Wraps search terms in <strong class=“highlight”>.
link_to An <a> tag.
link_to_type Link to the collection of a product type.
link_to_vendor Link to the collection of a vendor.
newline_to_br Turns line breaks into <br>.
payment_type_svg_tag An icon for a payment method.
placeholder_svg_tag A placeholder illustration for missing images.
preload_tag A <link rel=“preload”> for a file.
safe Kept for compatibility; output is still escaped unless it’s already trusted HTML.
script_tag A deferred <script> tag for a URL.
strip_html Removes HTML tags.
structured_data JSON-LD for a product or article.
stylesheet_tag A <link rel=“stylesheet”> for a URL.
time_tag A <time> tag with a formatted date.
Name Summary
asset_img_url URL of an image in assets/.
asset_url URL of a file in the theme’s assets/ folder.
file_img_url Image URL of a file (compatibility).
file_url URL of a file uploaded in the theme’s assets.
global_asset_url URL of a shared asset (compatibility).
handle Turns a string into a handle (lowercase, dashes).
handleize Same as handle.
shopify_asset_url (deprecated) Platform asset URL (compatibility alias).
sort_by A collection URL with a sort order.
url_decode Decodes a URL-encoded string.
url_encode Encodes a string for a URL (spaces become +).
url_escape Escapes a string for a URL path (keeps /).
url_for_type URL of the collection of a product type.
url_for_vendor URL of the collection of a vendor.
url_param_escape Escapes a string for a query parameter.
within A product URL inside a collection (/collections/x/products/y).
Name Summary
image_tag A responsive <img> with srcset, width, height and lazy loading.
image_url URL of an image at a size, served as WebP from the CDN.
img_tag (deprecated) A plain lazy <img> tag (older form).
img_url (deprecated) Image URL at a size (‘400x’, ‘400x300’, ‘master’).
product_img_url (deprecated) Product image URL at a size (older form).
Name Summary
money A price in the store’s currency.
money_with_currency A price with the currency code.
money_without_currency A price as a plain number.
money_without_trailing_zeros A price without .00 for whole amounts.
Name Summary
date Formats a date in the store’s time zone.
Name Summary
color_brightness Perceived brightness of a color (0–255).
color_darken Darkens a color by a percentage.
color_lighten Lightens a color by a percentage.
color_mix Mixes two colors (weight 0–100 is the first color’s share).
color_modify Changes one channel of a color.
color_to_rgb A color as rgb().
Name Summary
font_face @font-face rule for a font setting (compatibility).
font_modify A font setting at another weight or style (compatibility).
font_url URL of a font file (compatibility).
Name Summary
pluralize Picks a singular or plural word for a count (English-style).
t A translation from the theme’s locale files.
Name Summary
json A value as JSON.
weight_with_unit A weight in grams, shown in kg (default), g, lb or oz.
Name Summary
md5 MD5 hash (hex).
sha1 SHA-1 hash (hex).
sha256 SHA-256 hash (hex).

Was this page helpful?