WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
Remove "Leave a Reply" at end of each page for 20 12 Theme (9 posts)

  1. Christine.Leja
    Member
    Posted 1 year ago #

    Have already removed all comments where ever possible. Have searched existing suggestions and tried them all.

    Noticed that when commenting out the code below in the function somments.php, that the "Leave a Reply" is eliminated but that the text on the webpage appears to be part of the background rather than in the left-column where the image is located.

    How do I get the left column to reappear? (Note that I do not know php or CSS).

    Here's the code that I've been working with to eliminate the "Leave a Reply" comment:

    <?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>
    **/

    Thanks in advance for any help!

  2. kubegusa
    Member
    Posted 1 year ago #

    Am I looking at this too simplistically, or is it that you simply want to untick the 'allow comments' in your pages properties..? No need to mess with code.

  3. paulwpxp
    Font hero
    Posted 1 year ago #

    right, was thinking the same.

    It depends on what you really want to do, if the site doesn't need to have any comments at all, just turnn it off site wide, under Settins > Discussion and if needed turn it on on the post/page that need comments.

    Also, the code above is from TwentyEleven not Twenty Twelve as stated.

  4. Christine.Leja
    Member
    Posted 1 year ago #

    Sorry by I tried all the simple things. I turned all all comment possibilities under Settings > Discussion.

    Turned off all comments for each page and all pages.

    I don't see anywhere where comments could be allowed.

  5. Christine.Leja
    Member
    Posted 1 year ago #

    Ah! But maybe I have the wrong version of the template. I'm using WordPress 3.5 and I meant to select Twenty Twelve not Twenty Eleven!

    Will try to recreate with Twenty Twelve.

    Sorry for the error!

  6. kubegusa
    Member
    Posted 1 year ago #

    when you do a quick edit rather than an edit of a page or post, one of the options is 'comments allowed' and you can tick or untick right there

  7. webmobileconsultants
    Member
    Posted 1 year ago #

    Here are two ways to do this.

    1- When creating or editing a page click on Screen Options (top right)and tick Discussions then scroll down the page and untick Allow comments.

    2- Go to Page -> All Pages and tick the pages that you don't want comments on. Under Bulk Actions -> select Edit then Apply. Under Comments -> Select Do not allow then Update.

  8. Christine.Leja
    Member
    Posted 1 year ago #

    Thank you, all!

    I have now published http://www.LeComEnterprises.com using the Twenty Twelve template.

  9. qhs1966admin
    Member
    Posted 1 year ago #

    Unticking the "allow comment" box worked. However, FYI to others, I had to hard refresh the page to take it out of cache the lazy way "CTRL F5". Thanks for the help.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic