Skip to main content

Embed and pre-filter a Layout with shortcode

Only a Layout Builder design is a complete locator and has a locator shortcode. Open Store Locator → Builder, edit the Layout, and use Copy shortcode:

[cliq_store_locator id="123"]

id must be the Layout ID—not a Store Card, Search form, infobox, marker, or Category tile ID.

Placement attributes

Each shortcode placement can seed the locator with defaults:

AttributeValueExample
idSaved Layout ID, requiredid="123"
countryStored Store country valuecountry="IN"
categoryNumeric Category IDcategory="8"
brandNumeric Brand IDbrand="3"
qInitial keyword searchq="pickup"
meta_keyCustom field machine keymeta_key="service_mode"
meta_valueExact value required for meta_keymeta_value="delivery"
per_pagePage-size override; 0 uses Layout settingper_page="12"

To show only Stores in Category 8:

[cliq_store_locator id="123" category="8"]

To create a Brand locator restricted to India with 12 results per request:

[cliq_store_locator id="123" country="IN" brand="3" per_page="12"]

Defaults combine, so a Store must satisfy all supplied constraints. Use IDs shown by the relevant admin record/API rather than Category or Brand names.

To publish a locator containing only stores whose service_mode custom field is exactly delivery:

[cliq_store_locator id="123" meta_key="service_mode" meta_value="delivery"]

These placement filters are hard constraints. Search forms, category filters, URL search parameters, and Load More can narrow the result set further, but they cannot remove or replace category, brand, country, city, q, or the meta_key/meta_value constraint supplied by the shortcode, block, or page-builder widget. For example, a locator fixed to meta_key="demo_type" meta_value="hotel" returns no stores when a visitor chooses a category containing no Hotel records; it does not fall back to the unconstrained category.

Both custom-field attributes are required. Use the field's machine key from Store Locator → Custom Fields, not its visible label.

Can visitors change the default?

Yes, if the Layout exposes the corresponding Search/Category/Brand control. The attribute initializes the query; it is not an unchangeable permission boundary. To make a visually fixed Category locator, publish a Layout without a Category control and seed its Category ID. Developers needing an enforced authorization constraint should use cliq_sl_search_allowed_ids server-side.

Add it to WordPress

Paste it into a Shortcode block or a shortcode-aware theme/template location. Test while logged out. If it prints as text, the surrounding element escapes shortcodes. If nothing appears, confirm the Layout exists and the ID uses ordinary straight quotes.

Multiple locators on one page

Each placement may use its own Layout and defaults. When Google Maps is enabled, let the plugin enqueue the Google script once; do not add a second Maps JavaScript loader through the theme or another locator plugin.