WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] remove 'comments off' text on category view - twentyten (2 posts)

  1. elsielacietillie
    Member
    Posted 1 year ago #

    First off I have to apologise as I am still working locally and am yet to upload my site, so there is no link.

    Next up I am using a child twentyten theme.

    I want to be able to turn comments off on some posts and have comments turned on on others. My problem is that when comments are switched off there is some text saying "comments off" on the bottom of those posts and I want to remove it without also removing the link to comments if they exist.

    Strangely my comments.php file has a section of code that looks like it could be what I need but it uses the text "comments are closed" and removing/editing it has not helped.

    Some googling lead me to this guide ( http://blog.dir.vc/2011/11/05/wordpress-how-to-remove-comments-are-closed-php-code-snippet/#more-136) which does work but not in all cases. I was able to use it to remove the text from the individual page views but not from other views such as the main page or category view.

    I specifically want to be able to scroll through the category view without seeing "comments off" at the bottom of posts.

    Any ideas?

  2. elsielacietillie
    Member
    Posted 1 year ago #

    Just a little update to say that I resolved the issue. Popping my resolution in here in case it can help someone else.

    It isn't the neatest solution as it is outside the theme folder and will need to be redone each time wordpress updates but it has solved my problem so I am happy.

    In the 'wp-includes' folder there is a file called 'comment_template.php'. I opened up this file and searched for 'comments off', then deleted those words leaving the rest of the line including punctuation intact.

Topic Closed

This topic has been closed to new replies.

About this Topic