Tagged: woocommerce
hi all,
i want to move on my single product pages, the short description above price and additional infos.
sample below
so i need a php snipped for my child functions.php.
i found this:
// move product price
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 25 );
but this moved only the price of course :-)
thanks in advanced
Hey Ramon,
Maybe this guide will help you out? https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
Best regards,
Rikard
Hey Rikard,
thank you fot the quick answer. but this is not helping, sorry.
because my php-skills are limited to copy and paste :-)
greetz
Hi,
Please try the following in Quick CSS under Enfold->General Styling:
.single-product div.woocommerce-product-details__short-description {
position: absolute;
top: 30px;
}
.single-product .product_title entry-title {
margin-bottom: 30px;
}
Best regards,
Rikard
hi rikard, thank you very very much for your help. but css is not the solution. i need a php snippet for my functions.php.
i think i have to hire a freelancer.
anyways. thank you man :-)
Hi,
Thanks for the update. Please try this in functions.php instead:
function volmering_woo_change_short_description_location() { ?>
<script>
jQuery(document).ready(function($) {
var short_description = $('.single-product .woocommerce-product-details__short-description').detach();
$('.single-product .price').prepend(short_description);
});
</script>
<?php
}
add_action('wp_footer', 'volmering_woo_change_short_description_location');
You can see it working here: https://wpexpert.se/enfold/product/test-product/
Best regards,
Rikard
all i can say is: you are the best :-)
thank you rikard, works like a charm.
Hi,
Great, I’m glad that we could help :-)
Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
can be closed. thx
Hi,
Glad Rikard could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike