WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Taking comments off the front and category pages (6 posts)

  1. natalieben
    Member
    Posted 8 years ago #

    I'm using the Old School theme for http://www.mylondonyourlondon.com, which I've already modified a fair bit using my basic CSS knowledge. But I'm stumped on how to take all reference to the comments off the front and category pages.

    I want to lose the bit about "What do you think? Have I got it right? Click here to leave your views - 0 Comments " but to leave it on the post pages.

    All help most gratefully received. Thanks!

  2. moshu
    Member
    Posted 8 years ago #

    You should look in the index.php file of the theme to delete or comment out those line.
    May I suggest something else, too? I'd create a Page template (see > Pages#Page_Templates) in order to avoid the appearence of the comment box on Pages. It looks ugly.

  3. natalieben
    Member
    Posted 8 years ago #

    Thanks, the pages suggestion is a good one I'm about to implement.

    But I can't see how I can take the comments out of the index file without losing them also from the individual posts, which I don't want to do ... all help gratefully received!

  4. moshu
    Member
    Posted 8 years ago #

    There is a solution for that, too :)
    I suspect in that theme there isn't a single.php template file either. So I'd save my index.php as single.php (having the references/link to comments) and after that delete them from the index file. WP is "smart" so that knows which template file to select for different views > See Template_Hierarchy.

  5. natalieben
    Member
    Posted 8 years ago #

    I understand this solution, and it makes sense, except that I change other elements of templates, both index and single post pages regularly, and this would mean I would have to do all of that twice. I might just live with the comments on the front! But thanks for your help, and hopefully this might be helpful to others.

  6. natalieben
    Member
    Posted 8 years ago #

    Well, change of heart. I've just done this - it was remarkably simple, and it is working. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic