Home › Forums › Basel support forum › Reviews Are Not Accessible › Reply To: Reviews Are Not Accessible
May 19, 2017 at 5:43 pm
#14065
robertarrow
Participant
I realized that it was a conflict with Disqus, the comment plugin for Blogs that overwrites WordPress’s default commenting system. I found a code that allows the reviews to be shown on products and Disqus on posts. Can you let me know if this will have any conflicts on the site?
add_action('the_post', 'sb_remove_woocommerce_disqus', 10, 2 );
remove_action('pre_comment_on_post', 'dsq_pre_comment_on_post');
function sb_remove_woocommerce_disqus( $post, $query ) {
global $post, $wp_query;
if ($query->is_main_query() && $post->post_type == 'product') {
remove_filter('comments_template', 'dsq_comments_template');
}
}