WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[resolved] Removing "Leave a reply" on the top of post (9 posts)

  1. SriAdji
    Member
    Posted 1 year ago #

    I see there are 2 "Leave a reply"s in my post : in the top of post after title, and the 2nd is in the end of post. How can I remove the 1st one? I think most people wants to leave a reply after reading the post, and not after reading the title. :)
    Thank you for your kind help.

  2. TriciaB
    Member
    Posted 1 year ago #

    I too am struggling to find where this bit of code is. Any suggestions would be welcome.

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    Do not edit the Twenty Twelve theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.

  4. TriciaB
    Member
    Posted 1 year ago #

    Already done Esmi

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    Create a new copy of content.php in your child theme and remove:

    <?php endif; // is_single() ?>
    			<?php if ( comments_open() ) : ?>
    				<div class="comments-link">
    					<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    				</div><!-- .comments-link -->
    			<?php endif; // comments_open() ?>

    If you are using any post formats other than Standard, you may have to do the same thing with the other content-xxx.php template files.

  6. TriciaB
    Member
    Posted 1 year ago #

    Many thanks Esmi - done and working

  7. esmi
    Forum Moderator
    Posted 1 year ago #

    Excellent :-)

  8. PattyDB
    Member
    Posted 1 year ago #

    I tried doing this, and it didn't work for me. I was working in Dreamweaver, and after I deleted the portion it told me there was a syntax error in line 57:

    </footer><!-- .entry-meta -->

    Any idea what I might have done wrong? Thanks in advance for any help!

  9. Rich82
    Member
    Posted 1 year ago #

    Hey PattyDB,

    Try removing everything that Esmi said except the first line. Just don't remove this one

    <?php endif; // is_single() ?>

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic