fbpx
🤝  NEW YEAR SALE RETURNS - 50% OFF all plans! 🤝 Grab it Now

WP Page Builder Framework Compatibility

The WP Page Builder Framework theme has it’s own loop hooks for archive pages. Is there a code snippet I could use in functions.php to put the swatches before add to cart on archive pages?

Here are the WP Page Builder Framework hooks: https://wp-pagebuilderframework.com/docs/woocommerce-hooks/

 

Hakik Zaman

Hi Antero,

Thanks for reaching out to us.

Did you try the shortcode- [wvs_show_archive_variation] inside your WP Page Builder shop loop?

Thank You

Hi, yes I was able to place the shortcode where I wanted it to be using the themes hooks.

But how do I hide the default placement of swatches? Because now the swatches are twice under every product on the category pages.

Hakik Zaman

Hi Antero,

Glad to know it helped. Please add this snippet using Code Snippet Plugin to disable the default swatches:

add_action('woo_variation_swatches_pro_archive_page_loaded', function($wvs_pro){
remove_action('woocommerce_init', array( $wvs_pro, 'enable_swatches' ), 1);
}, 10, 1);

Thank You