Hi,
No unfortunately there is no shortcode. I was planning on adding it but I’m not sure when there will be time. Also, with Gutenberg coming soon shortcodes will become more and more deprecated 🙂
But you could create your own shortcode for it..
Just add this to your functions.php
function btf_shortcode( ) {
ob_start();
do_action( 'show_beautiful_filters' );
return ob_get_clean();
}
add_shortcode( 'custom_btf', 'btf_shortcode' );
and use [custom_btf] in VC
Thread Starter
ufopsi
(@ufopsi)
Hi, thanks for the tip. Sadly, it does not work for me. Nothing shows up.
Ah, if you’re not using it on a post type archive you’d also have to specify the post type slug as a second parameter:
do_action( 'show_beautiful_filters', 'mycptslug' );
Thread Starter
ufopsi
(@ufopsi)
Thank you! If I’m using on a page? I have tried with ‘page’ and ‘vendite’ (specific page) without success.
Best regards.
M
-
This reply was modified 8 years, 5 months ago by
ufopsi.
You specify the custom post type slug. Not the post type of where you want the filter to appear.
So if you want to filter a post type called “movies” on a page you place this on that page:
do_action( 'show_beautiful_filters', 'movies' );
if you want it to appear specifically on a page you should put a conditional inside the page.php in your theme.
Like:
if ( is_page( 'vendite' ) {
here it goes.
}