"Leave a Reply" link floating above my posts? (8 posts)

  1. cUbEnzIz
    Posted 3 years ago #

    Any insight greatly appreciated!

    Just installed 2012 Theme on a fresh install of 3.4.2. I fooled around with commenting out the comments php before I remembered you can turn of comments on pages from the dash now. So I changed the php back and did it through the dash.

    Anyways, now the "Leave a Reply" link is sitting above my posts, below the title. Like so: claytonglasser.com

    Why is this like this and how can I fix it?

  2. vtxyzzy
    Posted 3 years ago #

    Chances are that the check for comments_open() is missing. If you have not made other changes, just reinstall the theme.

    If you have made other changes, you should save the current theme folder by renaming it and changing the theme name in style.css. Then install a fresh copy of Twenty Twelve, create a child theme for it, and make all your changes in the child theme.

  3. cUbEnzIz
    Posted 3 years ago #

    Thank you for your response. I appreciate that.

    What you are saying does make sense, but...

    I have completely reinstalled all of the 2012 theme files over top of the old ones. comments_open() is right there in comments.php where it belongs.

    Oddly, it did not make a difference, the link is still out of place. Thoughts?

  4. vtxyzzy
    Posted 3 years ago #

    You should create a Child theme to make your changes. If you do not, all of your changes will be lost if you update your theme.

    Try adding this to the end of your child theme's style.css:

    .entry-header .comments-link { display: none; }
  5. WPyogi
    Forum Moderator
    Posted 3 years ago #

    @cUb -- that location of "Leave a Reply" is the way 2012 is coded...

  6. vtxyzzy
    Posted 3 years ago #

    The CSS I gave should take care of that.

  7. cUbEnzIz
    Posted 3 years ago #

    Thank you vtxyzzy for your advice and consideration.

    In light of WPyogi's Gordion-knot-cutting observation, I have decided to leave the link.


  8. vtxyzzy
    Posted 3 years ago #

    I have to disagree with WPyogi. Here is a snippet of code from content.php:

    <?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() ?>

    This definitely checks to see if comments are open before displaying 'Leave a reply', and it is the only place in Twenty Twelve that 'Leave a reply' is found.

    The code I gave will hide that.

Topic Closed

This topic has been closed to new replies.

About this Topic