Skip to content
IvaSure add-ons and services for SureCart storesJoin the POD waitlist

The block and the shortcode

2 min read
Published

A filter is placed on a page in one of two ways: the IvaSure Filter block in the block editor, or the [ivasure] shortcode anywhere a shortcode runs. They render the same filter from the same settings. Pick whichever suits where you are working.

UseWhen
The blockYou are editing in the block editor and want a live preview while you work.
The shortcodeYou are in a page builder, a template, a widget, or anywhere the block inserter is not available.
Neither one creates your products
Filters narrows a product listing that is already on the page. If there is no listing, there is nothing to filter - see Targeting your product grid below.

The block

In the block editor, search the inserter for IvaSure and place the block beside your product listing - usually in a sidebar column.

The block previews with your real sections and counts rather than a placeholder, so what you see while editing is what shoppers get.

The shortcode

The shortcode is a single line, and with no attributes it uses your global settings - the same ones the block uses.

The whole thing
[ivasure]
A page showing a filter panel on the left with sort options, a price range and sections for Rooms and Product Types, and a grid of product cards to the right.
The shortcode rendered on a page, beside the products it narrows.
  1. The filter, rendered from the shortcode. Everything else on the page is yours.

Attributes override your global settings for that one placement, which is how a landing page can carry a shorter filter than the shop:

Two sections, shown as pills, on this page only
[ivasure taxonomies="ks_room,ks_material" style="pill"]

What a shopper sees when a filter is applied

Once something is selected, the filter states it in three places at once. That redundancy is deliberate: a shopper who scrolled past the panel still needs to know why the grid is short.

The top of a filter panel reading 1 selected, with a chip labelled Bedroom carrying a remove cross, and a Clear all link to its right.
The active selection, shown above the sections.
  1. The chip, naming what is applied. Its cross removes just that one selection.
  2. Clear all, which removes every selection at once.

The address bar also gains a parameter, so a filtered view can be bookmarked, shared, or linked to from a campaign.

A filtered view, shareable as it is
/shop/?ks_room=bedroom

Telling which one a page uses

Inherited a site and not sure how a filter got onto a page? Open the page in the block editor. A IvaSure Filter block appears in the list view by name; a shortcode appears as a shortcode block containing [ivasure]. If neither is there, the filter is coming from a template or a page builder.

Save to list