• Hi…
    I’m working on a news site. It will be used to post headlines, summaries of news articles, and links to articles — but not for discussion. How do I remove all references on the site to “Comments”?
    I know that when I edit the post, I can disallow Comments.
    And I’ve commented out the “feedback” section in index.php.
    The problem is that when I click on a permalink to display a single post, the reader still sees a Comments header followed by “No comments yet”, and a Leave a Comment header followed by “Sorry, the comment form is closed at this time.”
    So, I guess I have two questions:
    1. How do I suppress these references to Comments when displaying a permalink?
    2. Is anyone else running a news-only WordPress site?
    Many thanks!
    M.

    Michael

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter m327

    (@m327)

    OK, I think I’m making progress. I’ve edited wp-comments.php and commented out the sections that display these references.
    On the other hand, I don’t really know what I’m doing. πŸ˜‰
    Are there other things I should be considering here besides simply editing out these parts of wp-comments.php?
    Thanks again.
    M.

    Michael

    it’s probably easier to delete the following reference in your template:
    <?php comments_template(); // Get wp-comments.php template ?>

    sorry the above is 1.3 code. what you want to delete in your template is this:
    <?php include(ABSPATH . 'wp-comments.php'); ?>

    Thread Starter m327

    (@m327)

    Thank you, charle97. That is cleaner!
    I do want to keep the string that display the Trackback URI, however. I’ve copied this from wp-comments.php…
    <?php if ('open' == $post->ping_status) { ?>
    <?php _e("The URI to TrackBack this entry is:"); ?> <?php trackback_url() ?>
    <?php } ?>

    …and dropped it into index.php immediately after the commented-out line…
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    It seems to do what I want (fingers crossed). πŸ˜‰
    Thanks again for your help.
    M.

    Michael

    Thread Starter m327

    (@m327)

    No, that didn’t work after all. It displays the Trackback info on the front page as well as the permalink. Oh, well. I’m back to the commented-out version of wp-comments.php for now.

    i wanna do the same thing like m327 did, but how to do it in kubrick’s default theme ver.1.5? i can’t find any of <?php include(ABSPATH . ‘wp-comments.php’); ?> in my templete…

    can anyone please help me?

    weepel:

    For the wordpress default theme ala Kubrick I think you need to remove the following:

    From index.php in the theme remove:
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

    From single.php in the theme replace:
    You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.

    <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Both Comments and Pings are open ?>
    You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site.

    <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Only Pings are Open ?>
    Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " rel="trackback">trackback</a> from your own site.

    <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Comments are open, Pings are not ?>
    You can skip to the end and leave a response. Pinging is currently not allowed.

    <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Neither Comments, nor Pings are open ?>
    Both comments and pings are currently closed.

    <?php } edit_post_link('Edit this entry.','',''); ?>

    with:
    <?php edit_post_link('Edit this entry.','',''); ?>

    That should then I think stop any hint of comments appearing.

    hope this helps

    westi

    m327

    No, that didn’t work after all. It displays the Trackback info on the front page as well as the permalink. Oh, well. I’m back to the commented-out version of wp-comments.php for now.

    If you are deleating all comment functions what’s the point of still displaying the Trackback URL?

    When sent a trackback is displayed the same as a comment. ie, no comments function, no trackbacks.

    thanks westi for the help..
    i did the same thing and it actually works, but sorry for didn’t tell you guys in more specific.

    Posted in Uncategorized | No Comments » <— i want to delete all this actually..

    thanks for the future help
    weepel

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘How to remove Comments function entirely?’ is closed to new replies.