WordPress.org

Support

Support » Themes and Templates » Twenty Twelve » [Resolved] [Theme: Twenty Twelve] How to delete "leave replay" from single post?

[Resolved] [Theme: Twenty Twelve] How to delete "leave replay" from single post?

  • Deleting this code from single.php

    <?php
    					// If comments are open or we have at least one comment, load up the comment template
    					if ( comments_open() || '0' != get_comments_number() )
    						comments_template( '', true );
    				?>

    or substitution “false” instead of “true” does nothing.

    Any ideas?

    http://wordpress.org/extend/themes/twentytwelve/

Viewing 15 replies - 16 through 30 (of 33 total)
  • i still disagree with:

    but your variant not working….

    the change to comments.php should be working and worked in my test site with Twenty Twelve.

    there might be a last chance with with css:

    .single #reply-title { display: none; }

    add this to style.css (ideally, but not necessarily, in a child theme) of Twenty Twelve.

    Are you using pages or posts? Try this in your child theme content.php

    <?php
    if ( ! is_singular() {
      comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) );
    }

    That should work. If not, are you sure you’re using Twenty Twelve? 😀

    @mindctrl1 – good point 😉

    I missed that smaller ‘leave a reply’ near the top of the post, and was focussing on the larger one just above the comment form ;-(

    for a css fix, that would be:

    .single .entry-header .comments-link { display: none; }

    to alchymyth

    even power css doesn`t work – http://dl.dropbox.com/u/12452793/css.JPG

    just edited my last reply – I was looking at the ‘wrong’ text ;-(

    Okey. Lets tell you.
    I dont want to create child theme, because i did some corrections in TwentyTwelve files(such as data formatting and social buttons). I know thats wrong and so-so and all of us must use child themes for editing.

    By the way could you help me and paste there required code for content.php or single.php to decide my so global trouble? For exaple on pastebin.org or somewhere else if the code for file very big for answer there.

    Wil be very appreciated, really.

    P.S
    Both variants (with css and last note from member mindctrl) doesn`t working for me.

    It looks like I was missing an ending ) in my previous comment, which I can no longer edit to correct.

    Post a screenshot highlighting exactly what you mean. There’s a bit of a language barrier here I think, and a screenshot with the area circled would help.

    to mindctrl
    thats your last comment
    “<?php
    if ( ! is_singular() {
    comments_popup_link( ‘<span class=”leave-reply”>’ . __( ‘Leave a reply’, ‘twentytwelve’ ) . ‘</span>’, __( ‘1 Reply’, ‘twentytwelve’ ), __( ‘% Replies’, ‘twentytwelve’ ) );
    }”
    it doesn`t working for me.

    i want very simple thing: delete note “leave reply” under the single post.
    screen http://dl.dropbox.com/u/12452793/single%202.JPG

    Replace your content.php with this one.

    to mindctrl

    Thanks). It`s everything ok at last.

    Glad to hear it. Can you mark this thread resolved?

    yes. sure.

    @alchymyth
    Great advice!

    edit comments.php of your theme, near the bottom, change:
    <?php comment_form(); ?>
    to:
    <?php comment_form(array(‘title_reply’ => “”)); ?>

    This worked for me perfectly in my child theme.

    Success via @konstantin Obenland:

    To remove ‘Leave a reply’ from the main page of the Twenty Twelve theme, remove the following code from content.php

    <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 -->

    perhaps the easiest is adding this line/code in style.css (line 1263)

    #respond h3#reply-title {
    	font-size: 16px;
    	font-size: 1.142857143rem;
    	line-height: 1.5;
    }

    and add this:
    display: none;

    you may also decrease the top-margin (if needed) in:

    #respond {
    	margin-top: 48px; <-- this value
    	margin-top: 3.428571429rem;
    }

    adding those lines/css codes in child-theme is strongly recommended. hope this helps.

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘[Resolved] [Theme: Twenty Twelve] How to delete "leave replay" from single post?’ is closed to new replies.
Skip to toolbar