Shortcode
Everything you have set on the tabs before this one lives inside the filter. The Shortcode tab is how you get it onto a page. It gives you two ready-made snippets - one to paste into a page, one to drop into a template file - and you copy whichever suits where the filter needs to appear.
In short
One section, two read-only fields. Copy the first into a page or a page builder. Copy the second into a PHP template. Both carry the same id, which is this filter's own - every filter you create gets its own shortcode.

Nothing to fill in - the tab exists to be copied from.
Shortcode Options
The tab's only section, and it holds both snippets.
Shortcode For Page/Post
The one most people need. Paste it into a page, a post, or a page builder - Elementor, Divi, the block editor or the classic editor - wherever you want the filter and its results to appear.
[caf_filter id='4000']
The number is this filter's own id. Yours will be different, so copy it from this tab rather than typing it out - that way you know it points at the right filter.
Shortcode For Page Template
The same shortcode wrapped in PHP, for when the filter has to go into a template file rather than into a page's content - a category template, an archive template, or anywhere your theme builds the page in code.
<?php echo do_shortcode('[caf_filter id="4000"]'); ?>
Put it where you want the filter to render. This is the version to use when you want one filter serving a whole set of pages - add it to a category template once and it works for every category that template covers.
Careful
Edit template files through a child theme, not the parent. A parent theme update overwrites its files, and your shortcode goes with them.
Which one to use
| Where the filter goes | Snippet to copy |
|---|---|
| A page, post or landing page | Shortcode For Page/Post |
| A page builder - Elementor, Divi, WPBakery | Shortcode For Page/Post, into a shortcode or text widget |
| A category, archive or other template file | Shortcode For Page Template |
Note
Save the filter before you copy the shortcode. The button at the top right reads Publish on a filter you have never saved, and Update once it has been published.
Common Questions
The shortcode is showing as text on the front end instead of a filter.
It has been pasted somewhere the shortcode is not processed - a plain text field, a heading, or a widget that does not run shortcodes. Move it into the page content or a shortcode block, and use the PHP version in template files.
Can I put the same filter on more than one page?
Yes. The shortcode can go on as many pages as you like, and they all use the same filter - change a setting once and every page picks it up.
Can I put two different filters on one page?
Yes, by pasting each filter's own shortcode. They have different ids, so they stay independent.
Why does the PHP version use double quotes inside?
Because the outer PHP string is in single quotes. Copy it exactly as the tab gives it to you - swapping the quotes breaks it.
Was this page helpful?
Thanks for your feedback!
