Remove Comments On Static Pages In WordPress

by goleza
11 replies
  • WEB DESIGN
  • |
I'm using Wordpress, version 3.3.1 and I have tried in vain to remove comments from my static pages. I only want comments enabled on my posts but not on the static pages. I'm not yet conversant with Wordpress. Can someone knowledgeable help me on this? I will appreciate.
#comments #pages #remove #static #wordpress
  • Profile picture of the author goleza
    I tried it already but the explanation given wasn't clear and systmatic for me to follow and make changes. If one knows any plugin that can remove the comments from the static pages, probably that would be the easiest way to do it.

    Originally Posted by LinkCrusher View Post

    i mean google!
    {{ DiscussionBoard.errors[5454743].message }}
  • Profile picture of the author retroid
    Go to "Appearances > Editor", find "page.php" template.

    Remove this code (or something similar)
    <?php comments_template(); ?>
    {{ DiscussionBoard.errors[5454764].message }}
    • Profile picture of the author goleza
      Is that code found under the Comments Template File? I have tried to look for it in vain. Please kindly guide further. I'm using Wordpress version 3.3.1

      Originally Posted by retroid View Post

      Go to "Appearances > Editor", find "page.php" template.

      Remove this code (or something similar)
      <?php comments_template(); ?>
      {{ DiscussionBoard.errors[5455200].message }}
  • Profile picture of the author retroid
    No, it's on your Page Template.

    Although some themes probably use different file structure but that's the first place you should check.
    {{ DiscussionBoard.errors[5455286].message }}
  • Profile picture of the author coolsharad
    go in page.php and remove <?php comments_template(); ?>
    {{ DiscussionBoard.errors[5455734].message }}
  • Profile picture of the author mapetshi
    wordpress .org /support/topic/turn-off-comments-on-pages-by-default

    this post might help you. sorry i cant post link yet.
    {{ DiscussionBoard.errors[5455800].message }}
  • Profile picture of the author blogfreakz
    sometimes you need to set the permission to edit any php files there,. to be able to save the changes... but you can do that using ftp apps, use filezilla go to

    public_html/youdomain.com/wp-content/themes/themename/page.php

    then go remove the <?php comments_template(); ?>

    good luck!
    {{ DiscussionBoard.errors[5456320].message }}
  • Profile picture of the author Istvan Horvath
    Look for another line to remove

    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

    The bold part is important to look for: the rest (of the text) can be anything...

    Yep, it's there on line #23 in page.php:

    <span class="comments"><?php comments_popup_link(__('No responses yet'), __('One response so far'), __('% responses so far')); ?></span>
    Signature

    {{ DiscussionBoard.errors[5458880].message }}
    • Profile picture of the author goleza
      Great! Thanks for your support. I have been able to remove all what I didn't want to appear on my site. Thanks to all those who contributed to this thread. I believe many other WordPress users will benefit from it.

      Originally Posted by Istvan Horvath View Post

      Look for another line to remove

      <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

      The bold part is important to look for: the rest (of the text) can be anything...

      Yep, it's there on line #23 in page.php:

      <span class="comments"><?php comments_popup_link(__('No responses yet'), __('One response so far'), __('% responses so far')); ?></span>
      {{ DiscussionBoard.errors[5467232].message }}
    • Profile picture of the author palimadra
      Originally Posted by Istvan Horvath View Post

      Look for another line to remove

      <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

      The bold part is important to look for: the rest (of the text) can be anything...

      Yep, it's there on line #23 in page.php:

      <span class="comments"><?php comments_popup_link(__('No responses yet'), __('One response so far'), __('% responses so far')); ?></span>

      Thanks a tonne for explaining clearly it really helped.

      However there is another solution specially for those who are afraid to dabble with code. In your Admin dashboard, Go to "Pages" -> "all pages". select all the pages for removing comments. Then from the "Bulk action" ,select "Edit" and then Apply. Then , a bulk Edit area will display, and their you can change Comments to "Do not allow". You should be done.
      {{ DiscussionBoard.errors[6457759].message }}

Trending Topics