WordPress.org

Forums

Jetpack by WordPress.com
[resolved] Disable Jetpack comments on specific pages (9 posts)

  1. herrin
    Member
    Posted 2 years ago #

    Am using the woocommerce plugin and on the product pages, the Jetpack comments prevent the reviews from working properly.

    Apparently it uses the is_product() function as told to me by the support team for Woocommerce.

    but the idea stands of is it possible to disable Jetpack comments on specific pages?

    Function.php file edit

    regards

    http://wordpress.org/extend/plugins/jetpack/

  2. Robinspp
    Member
    Posted 2 years ago #

    I am having the same problem, is there a solution for this? It also seems to be affecting the comments on my blog pages as well.

  3. evolutionsigns
    Member
    Posted 2 years ago #

    Also in need of help with this.

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    I am afraid it's currently not possible. You'd have to disable Jetpack Comments on the whole site.

    A work-around would be to edit the product page template, and build your own comments template instead of using comment_form(). You could copy the comment form from the code in this post, for example:
    http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/

  5. herrin
    Member
    Posted 2 years ago #

    Thanks very much Jeremy. Will test that out and give it a spin. Cheers.

  6. GuyOlinga
    Member
    Posted 2 years ago #

    Hi Jeremy,

    I'm using WP 3.5.1 with the last version of JetPack. My vistor can not enter comments as I have installed JetPack Comments. I don't why.

  7. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    @GuyOlinga Could you open a new thread about your issue, since the problem seems different from the original poster's?

  8. cam5
    Member
    Posted 1 year ago #

    I used a few lines in the single-product-reviews.php woocommerce template to unhook jetpack on only product pages:

    $jp = new Jetpack_Comments;
    
    remove_action('comment_form_before', array($jp, 'comment_form_before'));
    remove_action('comment_form_after', array($jp, 'comment_form_after'));
    
    comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) );

    Just calling the Jetpack_Comments class and removing those actions before the comment_form() was enough to selectively deactivate 'em.

    Note: your single-product-reviews.php might be in your themes /woocommerce/ folder, or in the /plugins/woocommerce/templates/ path.

  9. adamg511
    Member
    Posted 1 year ago #

    from the wp dashboard go to Pages> all pages. hover the page you want to change and select "Quick Edit" there is a check box for "allow Comments" that you can un-check

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic