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 - 1 through 15 (of 33 total)
  • Have you a Child Theme?

    No, I haven`t

    Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    I’ve not looked at Twenty Twelve (yet!) but modifying that file in Twenty Twelve will cause you pain later on. Best to avoid that.

    Don’t modify any Twenty Twelve file (or any theme file you download here for that matter). Instead create a child theme and make your changes in the child theme directory.

    That way when you get an update for that theme you do not lose your changes.

    http://codex.wordpress.org/Child_Themes

    I know and understand the importance of child themes, but it doesnt help me to solve the problem above. So I`m still looking for code hack to remove “leave replay” in single post.
    I do not understand the usability of this inscription in single post, because the form of comments so there is yet…

    Michael

    @alchymyth

    Forum Moderator

    this is generally not theme specific:

    have you exhausted all dashboard methods to ‘un-allow’ comments:

    dashboard – settings – discussion ?

    dashboard – posts – all postsquickedit below the post title – untick ‘allow comments’ ?

    if you have still comments or ‘leave a reply’ showing after using the options, please post a link to your post.

    @alchymyth

    I do need comments on my blog. I want to delete only note “leave reply” in single post. Could you read my first post more closer?

    Michael

    @alchymyth

    Forum Moderator

    I want to delete only note “leave reply” in single post.

    yes, you can do this with the dashboard options for selected single posts.

    I checked this with Twenty Twelve, and there is no trace of ‘Leave a Reply’ left in a single post if the comments are ‘un-allowed’.

    particular deleting your mentioned section from single.php of Twenty Twelve will not leave any output.

    I do need comments on my blog

    this is a direct contradition of your attempt to remove the comments code from single.php;
    ‘blog’ equals ‘posts’ and the commenting is usually done via the single post.

    if your sitution is different, please post a link to your site to illustrate your problem, and to allow somebody to start investigating.

    Michael

    @alchymyth

    Forum Moderator

    ps: if it is just about the wording ‘Leave a Reply’, have a look at http://wordpress.org/support/topic/how-to-change-wording-of-leave-a-reply?replies=39#post-1681116

    this would be in comments.php of your theme … which brings us back to the topic of creating a child theme to make the edit with…

    @alchymyth again.

    Apparently we speak different languages i see.

    1. I want just to delete the wording ‘Leave a Reply’ only in single posts.
    2. I really need comments allowed in all of my posts.
    3. Child theme or Twentytwelve itself..what difference if i can`t see here example for code DELETING the wording ‘Leave a Reply’, not editing in other words, just deleting it.

    I dont understand why i need wording ‘Leave a Reply’ in my single post when i have commenting form already below?
    my post example: http://dmikarpenko.com/pochta-rossii-cherez-dva-goda/

    Michael

    @alchymyth

    Forum Moderator

    1. I want just to delete the wording ‘Leave a Reply’ only in single posts.

    I got it – see my last reply.

    edit comments.php of your theme, near the bottom, change:

    <?php comment_form(); ?>

    to:

    <?php comment_form(array('title_reply' => "")); ?>

    if you need, you can remove the link to your site, if you edit your reply within 30 minutes after posting.

    Thanks, but your variant not working….
    still have the wording ‘Leave a Reply’

    Hi webula,

    did you ever try to look up ‘Leave a reply’ in the Theme, find out where it is set and delete it there?

    Maybe this will work:

    1. Create a Child Theme (if you didn’t already).
    2. Create a content.php file and copy the code from Twenty Twelve’s content.php file.
    3. On line 28, play with the first parameter of the comments_popup_link() function, an empty string will probably do.

    @konstantin Obenland

    Tried it already. Changing content.php changes comments_popup_link on main page too, but I need it.

    Well.. had to return to clean Twenty Ten theme.

    Thanks all for helping.

    If I understand you correctly, you only want to remove that message on the single posts view. If so, you can do something like this in your child theme’s content.php.

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

    That should leave it alone on the main index page, but not show it on single view.

    Nope. Doesn`t working too. I think TwentyTwelve Theme is Special Magic.

Viewing 15 replies - 1 through 15 (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