0

I've hunted high and low how to move reviews tab and bring it below product description.

How can this be done with CSS or plugin?

And reviews will be shown 25 at once with read more button that opens another 25 reviews.

0

2 Answers 2

0

Woocommerce uses jQuery (Javascript) to put reviews and content descriptions in separate tabs.

In this tutorial I use Javascript to put wordpress comments below the content after page loading has finished. For this do fast as I did in my wordpress sample page.

Go to header.php file in your themes, edit <body> tag to include <body> tag onload="myFunctiondf()" then it looks like below :

<body  onload="myFunctiondf()">

or if you have class in your theme looks like this :

<body <?php body_class(); ?> onload="myFunctiondf()"> 

Now go to footer.php, include this code before </body> which looks like this:

<script>
function myFunctiondf() {
document.getElementById("tab-reviews").style.display="block";
document.getElementById("tab-description").style.display="block";
document.getElementById("tab-title-reviews").style.display="none";
document.getElementById("tab-title-description").style.display="none";
}
</script>
</body>

Congratulation from now your product pages works as mine.

2
  • it is never a good idea for a new user to post links to a personal site in a question or answer. It just looks like you are attempting to add juice to your site.
    – RiggsFolly
    Oct 12, 2019 at 17:07
  • This is not a WP way of doing things. I wouldn't touch it.
    – Raymond
    Feb 8 at 19:02
-1

The following link from the WooCommerce docs should help you: https://docs.woocommerce.com/document/editing-product-data-tabs/

Re-ordering Tabs:

add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {

    $tabs['reviews']['priority'] = 5;           // Reviews first
    $tabs['description']['priority'] = 10;          // Description second
    $tabs['additional_information']['priority'] = 15;   // Additional information third

    return $tabs;
}
1
  • Sorry this doesn't work.
    – Raymond
    Feb 8 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.