Removing comment section on static home page (2 posts)

  1. pkoonts@yahoo.com
    Posted 1 year ago #

    Can anyone tell me how to remove the comment section from the static home page on my web site http://www.commonthreadsnc.com. I just want the static home page to have my comment and to have the comments on the blog page.
    Thanks for your help.


  2. Sean Davis

    Posted 1 year ago #

    The first thing you want to do is make sure you're using a child theme. Then with your child theme installed and activated, copy the page.php file from Patchwork into the root of your child theme.

    In that new file, find:

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

    Replace it with:

    <?php ! is_front_page() ? comments_template( '', true ) : ''; ?>

    That will make sure any WordPress Page you decide to set as the home page will not have comments, but the rest of the Pages will continue to.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic