This topic has 4 replies, 3 voices, and was last updated 5 months, 3 weeks ago ago by Andrew Mitchell
Sorry I originally closed the the thread too soon.
I originally asked if there’s a way to add the product price in between the variations selection and the add to cart button and the code provided worked great for a variation product, but not the ones without variations.
Is there a way to make the price above the add to cart button on all products?
Here was the code provided:
add_action(‘wp_footer’, ‘n2t_wp_footer’);
function n2t_wp_footer(){
if(is_singular(‘product’)){
?>
Hi @carlyliczyk,
Please update the previous codes to this:
add_action('wp_footer', 'n2t_wp_footer');
function n2t_wp_footer(){
if(is_singular('product')){
?>
<script>
jQuery( function($){
$(document).ready(function(){
$('[data-widget_type="woocommerce-product-etheme_price.default"]').insertBefore($("form.cart button.single_add_to_cart_button"));
})
});
</script>
<?php
}
}
Hope it helps!
Perfect! Thanks so much
Dear carlyliczyk,
Choosing our theme reflects your commitment to quality, and for that, we’re genuinely grateful. As we constantly strive to elevate your experience, your feedback is an invaluable gift. Could you kindly take a moment to rate our product with 5 stars on ThemeForest?
Click here to share your insights: https://themeforest.net/downloads
Your support fuels our journey, and we appreciate it more than words can express.
Best Regards,
The 8Theme Team
The issue related to '‘Add the product price in between the variations selection and the add to cart button’' has been successfully resolved, and the topic is now closed for further responses