WordPress.org

Ready to get started?Download WordPress

Forums

Comments Evolved for WordPress
[resolved] How to disable commenting for specific pages (5 posts)

  1. pcsk77
    Member
    Posted 11 months ago #

    Just wondering if I can disable commenting for specific pages?

    I'm looking to disable commenting on http://stevenkuo.azurewebsites.net/?page_id=1911 but still have commenting enabled for my posts.

    Thanks!!

    http://wordpress.org/plugins/gplus-comments/

  2. lvhieu_it
    Member
    Posted 10 months ago #

    Okay, I can fix your problem. But I'm not sure have an other problem.

    1. You find

    /wp-content/plugins/gplus-comments/includes/lib/frontend.php

    2. Edit

    frontend.php

    function comments_evolved_template($file) {
    global $post, $comments;
    if ( !(is_singular() && (have_comments() || 'open' == $post->comment_status))) {
    return;
    }
    return COMMENTS_EVOLVED_TEMPLATES . '/container.php';
    }

    => Add function "!is_page()"

    function comments_evolved_template($file) {
    global $post, $comments;
    if (!(!is_page() && is_singular() && (have_comments() || 'open' == $post->comment_status))) {
    return;
    }
    return COMMENTS_EVOLVED_TEMPLATES . '/container.php';
    }

  3. lvhieu_it
    Member
    Posted 10 months ago #

  4. pcsk77
    Member
    Posted 10 months ago #

    Thanks very much!! Exactly what I wanted.

  5. lvhieu_it
    Member
    Posted 10 months ago #

    Hihi, no problem. I think interesting when I help you. I living Vietnam country, I speak English not well, could you skip for me.

    http://thongtincanbiet.vn/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.