Skip to main content

Shortcodes

Each part of a view has its own shortcode, so you can lay out a search page however you like: filters in a sidebar, results in the main column, pagination underneath. Every shortcode takes the view's slug in view.

ShortcodePlacesOther attributes
[tgbl_searchsync_hits view="…"]The results
[tgbl_searchsync_filter view="…" name="…"]One filtername: the filter's name
[tgbl_searchsync_filter view="…"]Every filter without its own shortcode, grouped
[tgbl_searchsync_user_filter view="…" name="…"]One user filtername: the user filter's name
[tgbl_searchsync_pagination view="…" name="…"]A pagination or per-page itemname: the item's name
[tgbl_searchsync_metadata view="…" metadata="…"]A results summarymetadata: the meta item's name

The editor shows the right shortcode, with a copy button, wherever Generate Shortcode is switched on.

Matching names​

Names are matched without regard to case, and spaces count as hyphens, so name="Experience Level" and name="experience-level" find the same filter. A filter with no Filter Name uses one based on its label.

When a shortcode shows nothing​

Visitors never see shortcode errors. If you're logged in as an administrator, a broken shortcode shows a red message explaining the problem, such as a view slug that doesn't exist or a filter name that doesn't match.

Older shortcodes

Shortcodes from before the plugin was renamed, such as [tgbl_algolia_hits], still work and always will. See Backwards compatibility.