WordPress.org

Ready to get started?Download WordPress

Forums

How to remove comments from certain 2010 templates (8 posts)

  1. beanfair
    Member
    Posted 3 years ago #

    I know people can opt out of every page to display comments but I have someone that needs a certain page template without comments. Usually it is pretty easy to comment out the comment section on a page but that isn't so clear cut with 2010. How can I remove the comments on the one column template of 2010?
    Thank you!

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Don't edit the Twenty Ten theme! Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

  3. beanfair
    Member
    Posted 3 years ago #

    Of course I would NEVER edit the 2010 files directly. That defeats the purpose. I have copied the one column template file into the child theme.
    I still need assistance with removing the comments from the 2010 one column template for the child theme.

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    have you tried to remove this line from the one column template:

    <?php comments_template( '', true ); ?>

  5. ripriprip
    Member
    Posted 3 years ago #

    which file is that in? I looked in pages.php and it's not in that one?
    Tammy

  6. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    have you tried to remove this line from the one column template:

    there is only one 'one column' template in the twenty ten theme files: onecolumn-page.php;
    btw: pages.php is not one of the default templates in the twenty ten theme.

  7. ripriprip
    Member
    Posted 3 years ago #

    Oh, I was thinking..well lets say I wasn't thinking ... ok, thanks for looking after me on that, I'll have a look there.
    :)

  8. ripriprip
    Member
    Posted 3 years ago #

    I guess the note with onecolumn-page.php that said no sidebar thru me off, because I want a sidebar, so I didn't think to look there. - that was it.
    :)

Topic Closed

This topic has been closed to new replies.

About this Topic