WordPress.org

Ready to get started?Download WordPress

Forums

Removing Comments from Twenty Eleven (1 post)

  1. Christine.Leja
    Member
    Posted 1 year ago #

    Have tried all recommendations to remove comments from web pages but still get a "Leave a Reply" on each web page which I want to remove.

    Even tried looking at the code for the function on comments. Was able to remove by commenting the code below but then the framing below the header and image just showed the words on top of the background. Lost the left column look.

    Here is the code I tried to comment out in the comments.php function:

    <?php
    /**
     * The template for displaying Comments.
     *
     * The area of the page that contains both current comments
     * and the comment form. The actual display of comments is
     * handled by a callback to twentyeleven_comment() which is
     * located in the functions.php file.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    ?>
    	<div id="comments">
    	<?php if ( post_password_required() ) : ?>
    		<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p>
    	</div><!-- #comments -->
    
    	<?php
    			/* Stop the rest of comments.php from being processed,
    			 * but don't kill the script entirely -- we still have
    			 * to fully load the template.
    			 */
    			return;
    		endif;
    	?>
    
    	<?php // You can start editing here -- including this comment! ?>
    
    	<?php if ( have_comments() ) : ?>
    
    /**
    *		<h2 id="comments-title">
    *
    *			<?php
    *
    *				printf( _n( 'One thought on ā€œ%2$sā€', '%1$s thoughts on *ā€œ%2$sā€', get_comments_number() , 'twentyeleven' ),
    *					number_format_i18n( get_comments_number() ), '<span>' . *get_the_title() .   '</span>' );
    *			?>
    *		</h2>
    */

Topic Closed

This topic has been closed to new replies.

About this Topic