Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1235684
    powrider686
    Participant

    Hello,
    On my site, roadsidegal.wpengine.com, I’m having a bit of a problem with the disqus comments taking over the reviews in product pages. Normally it seems the reviews are viewed as comments, and that’s making the Disqus plugin overrule the reviews.

    Can that be changed and have the comments excluded or are they taken into consideration and look like reviews when made?

    Thank you!

    #1235709
    Christopher
    Moderator

    Hi there,

    Please disable ‘Reviews Tab’ under Customize -> Woocommerce -> Product Tabs.

    Thanks.

    #1236003
    powrider686
    Participant

    That could work, but then there are no reviews.

    I would very much like to still have reviews on the products, just normal reviews without disqus. Is that possible?

    Thank you!

    #1236306
    Rue Nel
    Moderator

    Hello There,

    Thank you for the clarifications! This issue has been raised already here: https://github.com/woocommerce/woocommerce/issues/1392

    There is a snippet that could resolve your issue. Simply add the following code into your child theme’s functions.php file

    function disqus_override_tabs($tabs){
        if ( has_filter( 'comments_template', 'dsq_comments_template' ) ){
            remove_filter( 'comments_template', 'dsq_comments_template' );
            add_filter('comments_template', 'dsq_comments_template',90);//higher priority, so the filter is called after woocommerce filter
        }
        return $tabs;
    }
    add_filter( 'woocommerce_product_tabs', 'disqus_override_tabs', 98);

    Please let us know if this works out for you.

    #1239666
    powrider686
    Participant
    This reply has been marked as private.
    #1240355
    Lely
    Moderator

    Hi There,

    Since you’re using X Disqus, please try this code instead:

    function disqus_override_tabs($tabs){
            remove_filter( 'comments_template', 'x_disqus_comments_template' );
            add_filter('comments_template', 'dsq_comments_template',90);//higher priority, so the filter is called after woocommerce filter
    
        return $tabs;
    }
    add_filter( 'woocommerce_product_tabs', 'disqus_override_tabs', 98);

    Hope this helps.

    #1242923
    powrider686
    Participant

    Ok so that fixed having Disqus show up, but now it just shows Leave A Reply instead of the reviews area like is shown in the demo.

    Please advise on how I can get the reviews showing again.

    Thanks for the help!

    #1242943
    powrider686
    Participant

    The site is now roadsidegallery.com 😉

    Launched it!

    #1243299
    Lely
    Moderator

    Hello There,

    Unfortunately, we can’t have both as of the moment. It is either we display reviews or disqus comments. By default, reviews are using WordPress comment section and then Disqus use it too. AS you can see in our sample here:http://demo.theme.co/shop-ethos/product/happy-ninja/, this is not using comment but just reviews. Not both of them are displayed.

    Hope this helps.

    #1243312
    powrider686
    Participant

    I get that. Sorry, I wasn’t clear.

    I have Disqus disabled successfully on the product pages, but I would like the Reivews to work like they do in the demo. When I disabled Disqus on the product pages in comment #1240355, then it revented to the default wordpress comments and not the reviews.

    Take a look here and you should see what I’m seeing – https://roadsidegallery.com/shop/abandoned/abandoned-tractor-steering-wheel/

    I’d like it to look like it does in the shop demo, so that the reviews show up nicely.

    Thanks for the help!

    #1243455
    Lely
    Moderator

    Hi There,

    Thank you for the clarification.
    Please try to upload the code to this:

    function disqus_override_tabs($tabs){
    
    	if ( has_filter( 'comments_template', 'x_disqus_comments_template' ) ){
            remove_filter( 'comments_template', 'x_disqus_comments_template' );
    		add_filter( 'woocommerce_product_tabs', 'woocommerce_default_product_tabs' );
    
        }
        return $tabs;
    }
    add_filter( 'woocommerce_product_tabs', 'disqus_override_tabs', 98);
    

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-1235684 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>