Using the Layout Builder

FacetWP includes a built-in layout builder. It allows you to quickly spin up a listing or grid template, which can then be used in alongside any number of facets.

Browse to Settings > FacetWP and click “Add template”. New templates use the Layout Builder by default. If more flexibility is required and you’re experienced with WordPress development, you could switch to Advanced mode.

The Layout Builder is covered in the above video, starting at 1:49.

Using dynamic tags

Dynamic tags let you use a field’s value within a separate field.

Let’s say you have a custom field named “photo_url”, and you want to wrap its value into an <a> tag.

First, create a new layout item and select the custom field:

Selecting item source

Next, set its name to photo-url and mark it as hidden:

Editing layout item

Finally, add a new HTML item and set its “Content” to:

<a href="{{ photo-url }}">{{ photo-url }}</a>

FacetWP automatically replaces all instances of {{ photo-url }} with the custom field’s value. You can even pull in multiple fields.

Outputting a template

Templates are added to your pages via shortcodes. See the “Shortcodes” section below for more info.

See Also