Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move product description after short description in Woocommerce

I've used the first option of this hook (the other ones didn't work) -> Woocommerce Product Default Description for All Products

And this is how it looks (the red marked text is the standard description)

However, I want the text to appear after the product description. where the red arrow is, I want the standard text. So above 'in winkelmand' (which means 'add to bag')

How can I achieve this?

like image 535
Lianne Avatar asked Aug 31 '25 22:08

Lianne


1 Answers

This can be done with the following code (commented):

// 1. Remove the description product tab
add_filter( 'woocommerce_product_tabs', 'remove_descrip_product_tab', 98 );
function remove_descrip_product_tab( $tabs ) {
    // Remove the description tab
    unset( $tabs['description'] );

    return $tabs;
}

// 2. Add the product description after the product short description
add_action( 'woocommerce_single_product_summary', 'my_custom_action', 25 );
function my_custom_action() {
    global $post;

    // Product description output
    echo '<div class="product-post-content">' . get_the_content() . '</div>'; 
}

Code goes in function.php file of your active child theme (or active theme). Tested and works.

like image 95
LoicTheAztec Avatar answered Sep 03 '25 13:09

LoicTheAztec