• Resolved tmcgonegal

    (@tmcgonegal)


    Under each blog post, in addition to the words “Posted in xxxx”, my blog displays “Comments Off”.

    Since I have comments turned off for all posts by default, I’d kinda like to get rid of the “Comments Off” indicator. Can anyone suggest how I can do this?

    Thanks,

    Tom

Viewing 3 replies - 16 through 18 (of 18 total)
  • I would like to remove the “Comments are closed” text for posts/pages where comments are disabled, BUT leave the entire commenting section for posts where they’re allowed.

    Can I do that with this snippet change? It seems like that would work just fine.

    Here’s the real question:

    Why isn’t there a checkbox on the WP side of things that says “Comments Invisible’ that would then render all comments invisible?

    Seems like a lot of work for WP folks to go through either the theme or the core files and have to edit/erase code that will ultimately be replaced in the next update.

    What a pain!

    For people who have some posts that allow comments and some that do not, here’s how to change “Comments Off”:

    Line 720 of wp-includes/comment-template.php has the words ‘Comments Off’ as the value of the variable $none (in the comments_popup_link function)

    wordpress codex: FAQ working with wordpress

    To completely remove “comments off”, open wp-icludes/comment-template.php in a text editor (notepad).

    look for:

    function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $css_class = '', $none = 'Comments Off' )

    Change it to:

    //change $none = 'Comments Off' to $none = ''
    function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $css_class = '', $none = '' )

    This will make it so that nothing at all appears on posts that have comments disabled. For posts that have comments enabled, the usual message can still appear.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘“Comments Off”’ is closed to new replies.