admin管理员组

文章数量:1279147

By default in woocommerce when a user wants to add a review of a product, they click 'add a review' and this opens up a pop-up lightbox. I want to disable this part and just display the review form. Anybody has any ideas?

By default in woocommerce when a user wants to add a review of a product, they click 'add a review' and this opens up a pop-up lightbox. I want to disable this part and just display the review form. Anybody has any ideas?

Share Improve this question asked Apr 29, 2013 at 12:49 KeithKeith 1,5664 gold badges17 silver badges21 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

Here's a hack you can use.

Update: As Andrew Bartel mentioned below. It's best to copy the template files into your theme so that they override the default woo commerce template files.

In your woocommerce plugin folder, look for a file called product-reviews.php

woocommerce/templates/single-product-reviews.php

Look for a line that says

<div id="review_form_wrapper">

Either remove the class review_form_wrapper, or add a 1 in front of it. That will make the hidden form visible.

Next you will want to remove the other buttons that says ADD REVIEW (triggers lightbox), because you will already have the SUBMIT REVIEW button at the end.

You will want to modify these lines to your needs:

<a href="#review_form" class="inline show_review_form">submit yours</a>

<a href="#review_form" class="inline show_review_form button" title="' . __( 'Add Your Review', 'woocommerce' ) . '">' . __( 'Add Review', 'woocommerce' ) . '</a>

You could either remove the lines above, or you could just add a display:none to each paragraph element to hide the whole thing

 style="display:none"

本文标签: pluginsHow to disable lightbox popup for quotadd a reviewquot only