Tagged: woocommerce
-
AuthorPosts
-
March 11, 2022 at 9:46 am #1344100
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
March 11, 2022 at 11:13 am #1344120Hey Ramon,
Maybe this guide will help you out? https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
Best regards,
RikardMarch 11, 2022 at 3:56 pm #1344150Hey Rikard,
thank you fot the quick answer. but this is not helping, sorry.
because my php-skills are limited to copy and paste :-)
greetz
March 12, 2022 at 11:42 am #1344194Hi,
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,
RikardMarch 12, 2022 at 12:28 pm #1344197hi 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 :-)
March 12, 2022 at 2:08 pm #1344215Hi,
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,
RikardMarch 12, 2022 at 5:54 pm #1344236all i can say is: you are the best :-)
thank you rikard, works like a charm.
March 12, 2022 at 6:59 pm #1344241Hi,
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,
RikardMarch 13, 2022 at 9:28 am #1344265can be closed. thx
March 13, 2022 at 1:09 pm #1344271Hi,
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 -
AuthorPosts
- The topic ‘Woocommerce – Move Short Descreiption above Price and Additional Info’ is closed to new replies.
