fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Change position of variations on archive

Joel Mellin

Namnlös.png

We would like to move the variations on archive page up just below the product title.

We are using this theme:

OceanWP Version: 3.5.5

Hakik Zaman

Hi Joel,

Thanks for reaching out to us. You can add the following snippet using the Code Snippets plugin-

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

Please let me know whether it helps to achieve your goal or not.

Hope to hear from you soon.

Thank You