WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Eliminate Comment Option (10 posts)

  1. dckantor
    Member
    Posted 6 years ago #

    I am setting up a site with no commenting options. Can I remove the line that says "Comments are closed" or words like that. I just want nothing relating to comments at all. Using Hi-Tech theme.

    Thanks

  2. dckantor
    Member
    Posted 6 years ago #

    I need to remove the "Leave a Reply" text also.

    Thanks

  3. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Look for this code in your main index template

    <?php comments_popup_link('', '', ''); ?> Whatever is between the ''s is irrelevant. Just delete this piece of code making sure to delete from the <? to the ?>

  4. dckantor
    Member
    Posted 6 years ago #

    Commented out the line of code but still have text for comments:

    http://www.murphtor.com/wordpress/?page_id=7

    Also want to remove the "Leave a Reply" option

    http://www.murphtor.com/wordpress/?page_id=5

    Thanks

  5. moshu
    Member
    Posted 6 years ago #

    So, that's a Page as in Pages.
    To learn which template file is used to display your Pages - read: Template_Hierarchy.

  6. dckantor
    Member
    Posted 6 years ago #

    Well I managed to remove them by commenting out the actual text that appears on the page from "comments.php". Not a very elegant solution though. I am looking at the template pages now and it looks like it should be reading pages.php since I didn't pick any other than the default for the template on the page. pages.php has only one seemingly relevant line " <?php comments_template(); ?>" but I'm not sure that's the one to change.

  7. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Yes that is the line you need to remove. That calls the comment form.

  8. Adam Brown
    Member
    Posted 6 years ago #

    Yes, delete it.

    edit: dang, you beat me.

  9. dckantor
    Member
    Posted 6 years ago #

    Success - Thanks

  10. onyourplate
    Member
    Posted 6 years ago #

    Can someone suggest how to remove comments option from one page not all pages? I would like remove comments from "photos" page
    http://www.re-lee.com

Topic Closed

This topic has been closed to new replies.

About this Topic