Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter nkdawe

    (@nkdawe)

    Here’s a better solution to this problem:

    If you want to remove the comment box on a specific page, such as a static home page, look up the page-id in the <body> statement of the page you want to modify – (View Page Source).

    Then simply add the following code to your css file (in the child directory, of course):

    /* Remove comment box from static home page */

    .page-id-251 #comments {display:none;}

    This will remove the Comments box only from the page whose class id is 251 (Your page number will be different). My first solution (above) removed the comments box from every page, which is not what I wanted.

    Thanks to Geert at WordPress Answers (https://wordpress.stackexchange.com/users/4936/geert) for this.

    This method can be used to change styles for one page, alone.

    Thread Starter nkdawe

    (@nkdawe)

    Thanks but I can assure you that the problem is real, at least on my site.

    At any rate, I did find a solution, which appears to be working.

    I added the following to the WP CSS file in my twenty-ten child directory:

    /* Remove comment box from static home page */

    body.page #comments {display:none;}

    In Twenty-ten (stock) theme, I have tried to comment out the PHP code

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

    in

    loop.php
    loop-page.php, and
    loop-single.php

    However, the comments box continues to appear on my static home page. Under Discussion, both items (comments and pingbacks) are unchecked.

    Has anyone figured a way to remove the comments box on a static home page in the Twenty-ten theme while using TPG Get Posts?

Viewing 3 replies - 1 through 3 (of 3 total)