WordPress.org

Ready to get started?Download WordPress

Forums

remove “Comments are Closed” from Arclite 1.4.2 theme (6 posts)

  1. rbeazley
    Member
    Posted 5 years ago #

    Hi there,

    I am using your Arclite 1.4.2 theme and I had comments on all 4 of my pages. I only wanted comments on one page. Following the WordPress Help Section, I removed the “allow pings” and “allow comments” checks from each of the pages and I was able to remove comments completely from 2 out of the 3 pages I did not want comments on. However, on one page “Speaking” it shows “Comments are Closed” and I would like that completely removed like the other 2 pages, do you know of any way to do this?

    my site

  2. figaro
    Member
    Posted 5 years ago #

    If you want to remove comments from only certain pages and leave them for other pages, then you will need to create a custom page template (it can be a copy of your current page template), remove the commenting code from that template, and then use that template on the pages where you don't want the comments text to appear. If you want to remove comments text from all pages, then just edit the page.php template.

    The following video, although created to show how to completely remove comments from all pages/posts, should give you the information you need to hunt down the code you need to remove from your page template.

    [link moderated]

  3. f00bar
    Member
    Posted 4 years ago #

    By commenting out or deleting the following line in single.php:

    <?php comments_template(); ?>

    it will remove any reference to comments including the Comments Are Closed line.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    the better way IMHO is to wrap that in a conditional like this:

    <?php if ( comments_open() ) : ?>
    	<?php comments_template(); ?>
    	<?php endif; ?>

    that way if comments are open, it shows the comments. If they are closed, it shows nothing.

  5. f00bar
    Member
    Posted 4 years ago #

    @RVoodoo That's actually a good point! Guess I was taking the easier way out...

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    Its the same way I did it my first couple of themes.... then stumbled on that and it made way more sense to me too!

Topic Closed

This topic has been closed to new replies.

About this Topic