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

Change position of swatches on archive page to display before product title

Daniel Handcock

Hi there,

In the plugin settings, we have noticed an option to display swatches either before or after the “Add to Cart” button.

Could you please provide us with the action hook code to remove the swatches from the default above location, as determined by the plugin settings? We would like to display them before the product title on the Shop Archive and custom loop.

Our website is using the Divi theme.

Image: https://www.dropbox.com/scl/fi/a0lv8408yl28lgfv9br61/swatches.png?rlkey=mxr34ngmewbdcxqwoyuwaax5j&dl=0

Thank you.

Daniel Handcock

Please disregard this ticket.

We’ve discovered an alternative solution. Rather than altering the position of swatches, we moved the title and price from their default location and hooked them to display at ‘woocommerce_after_shop_loop_item’ with priorities 15 and 20, respectively. This approach has achieved the desired result we were aiming for.

Thank you.