plugins - Add comment feature to woocommerce Shop page

admin2025-01-07  6

I want users to give their Reviews about the products. Currently have woocommerce installed in my wordpress site . I want to add the comments at the bottom of the Woocommerce shop page (not single product page), below last product in the shop page.

I have tried using wp_list_comments( ); But all it is not showing comments.

Thanks for your help in advance.

I want users to give their Reviews about the products. Currently have woocommerce installed in my wordpress site . I want to add the comments at the bottom of the Woocommerce shop page (not single product page), below last product in the shop page.

I have tried using wp_list_comments( ); But all it is not showing comments.

Thanks for your help in advance.

Share Improve this question asked Dec 26, 2013 at 8:59 kishore chowdarykishore chowdary 11 bronze badge
Add a comment  | 

2 Answers 2

Reset to default 0

Woocommerce itself has an option to view comments from dashboard without editing the core. Please Read the documentation fully. But, You need to code little to view the comment option only on shop page. (Suggestion: Enable comment in all pages and do display:none on #comment where ever you don't need it.)

Make sure comments are enabled on the Shop Page.

Then hook the wp_list_comments(); at woocommerce_after_shop_loop.

Something like this;

function display_comments() {
    if (is_shop()) {
        wp_list_comments(array( 'format' => 'html5' ));
    }
}
add_action('woocommerce_after_shop_loop', 'display_comments');
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736262782a840.html

最新回复(0)