Support » Fixing WordPress » Delete "Leave a Reply" | "Comments" et. al.

  • Resolved scooter339


    This question must have been asked hundreds of times. I have looked and can’t get the same answer.

    How can I get rid of Leave a Reply and comments.

    I would rather go after them in a php file.


Viewing 15 replies - 1 through 15 (of 16 total)
  • This depends on the theme you are using. Could you post a link to your site and let us know what theme you are using?

    Log in to you dashboard and go to Settings > Discussion

    Un-tick Allow people to post comments on new articles

    Un-tick Enable threaded (nested) comments

    You can also control the comment on individual page / posts by un-ticking the comments box. If you can see the comments box on the individual post edit pages, you can reveal it by going to the top right hand corner of the screen and clicking on the screen options drop down. Tick the Comments and discussions checkboxes and you will be able to control what you show on a page by page basis too.

    I think the issue might be that I am building a child theme on top of 2012. The site is

    I was able to get rid of “reply” before by doing what you suggested. In fact, I deselected everything I could on the discussions page.

    So were you able to turn them off? I still see Leave a Reply?

    The code you are looking for is in your comments.php section. You can manipulate that to not show comments.

    You should be able to just remove the get_comments() tag, that grabs the comments template. Not sure where that is in the 2012 theme, probably in single.php or content-single.php.

    Thanks GF. I’m just starting on php and I’m wondering where in this code I should place “//”

    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header">
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    		<div class="entry-content">
    			<?php the_content(); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<footer class="entry-meta">
    			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post -->

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    If it is a child theme, just copy the file into your child theme and delete the code.

    Well, that was just too simple for me. It’s logical and a great help.

    Great! 🙂

    I spoke too soon. I removed the code:

    Updated, but I still see reply on each page:

    I just did a test and I removed the code in there on the same theme and it worked. That controls the comment code so without it, you should not be showing the reply. Is that in your child theme?

    I’ll look in the child theme.

    I’m getting a bit worried:

    Turns out, I removed the code form the content.php page. I restored it an no difference to the following:

    Home page displays content but also reply
    All other pages including sample page no longer display con ten but the reply form is gone.

    The contact page displays the the form but also the reply form.

    Maybe you can try to flush your browser cache to see if you see the changes again but this is a lesson in making backups as well. These things happen and you have to have a way to restore if something gets screwed up. There are many methods of backing up and that should become part of your work flow in the future. Good luck.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Delete "Leave a Reply" | "Comments" et. al.’ is closed to new replies.