WordPress.org

Forums

Patchwork
Removing comment section on static home page (2 posts)

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

    Hi,
    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.
    Peggy

    https://wordpress.org/themes/patchwork/

  2. sdavis2702
    Member
    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

Tags