Support » Plugin: TPG Get Posts » Removal of Comment Box from static page in 20-10

  • Resolved nkdawe


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

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


    loop-page.php, and

    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 4 replies - 1 through 4 (of 4 total)
  • Plugin Author cswaim


    This has been discussed in this link and I have not been able to reproduce the problem on my site using twenty-ten. But I have turned off comments in general (setting >> discussion) and then enable on post where discussion is allowed.

    Hope that helps.



    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 */ #comments {display:none;}

    Plugin Author cswaim


    Thanks for the follow-up on the solution. This is a nagging problem that seems to appear randomly. Hopefully, a pattern will emerge and a solution can be found. Posting your solution will help in getting this resolved.



    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 ( for this.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Removal of Comment Box from static page in 20-10’ is closed to new replies.