• Resolved miltonics

    (@miltonics)


    Hi,

    I’m having a problem with the comment box unexpectedly appearing on a static home page with TPG Get Posts enabled.

    http://midwestpermaculture.com/

    Removing the shortcode also removes the comment box. On the when editing the static page, under discussion both items (comments and pingbacks) are unchecked.

    On the blog post, under discussion both items are checked. Unchecking them removes the comment form.

    Shortcode:

    [tpg_get_posts numberposts=1 show_byline=”false” show_meta=”false”]

    Couldn’t find any info on the Template Tags/get posts codex page. Tried some random stuff too, with no luck.

    Bottom line I only want the comment form on the blog post page, not the static page. Removing it from the blog post to keep it off the home page is not an option.

    Thanks!

    http://wordpress.org/extend/plugins/tpg-get-posts/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Criss Swaim

    (@cswaim)

    Thank you for the detailed explanation, link to site and sample of the short-code used. It really helps me create the test environment. I wish all problem reports were this clear.

    I have this plugin working on 2 two test sites and I created a post with comments on which allows comments to be posted on the individual post page, but comments are off for the system. On the blog page and the static page with the short-code, the comment box does not appear. The comment box only appears on the individual post page

    The themes I tested with are a modified 2010 and Suffusion. I think this may be a problem with the theme.

    ***Disclaimer***

    the following is after about 10 minutes of analysis. I am not familiar with this theme, so these ideas may or may not work. Use at your own risk.

    In looking at the site, I believe you are using justcss theme. If that is true, then the theme does not have a special page for the front-page.php or home.php. If you are using a static front page, then you can try copying the page.php to front-page.php and removing line 24 ‘comments_template( ”, true )’ in the front-page.php file. But that may break other things…. without installing the theme and testing, I cannot offer a solid solution – only suggestions.

    If this works, please post back and let everyone know

    Thread Starter miltonics

    (@miltonics)

    Thanks!

    I changed the comments_template( ”, true ) to comments_template( ”, false) on page.php line 24, since none of our static pages have comments enabled.

    All the comment forms seem to be working, including when enabled on a static page.

    I’m having a problem with the comment box unexpectedly appearing on a static home page with TPG Get Posts enabled.

    I’ve the same problem…WP-3.4.2, latest WPG amd here is my code:

    [tpg_get_posts numberposts=1 show_entire="true" category_name="bhagavad-gita"]

    Tried to change the line as above in my page.php (TwentyEleven theme), but it does not help?

    Any hint?

    Plugin Author Criss Swaim

    (@cswaim)

    I have not fully tested this as I have not had this problem on my sites, but here is how I would approach it:

    in page.php, comment out line 24 that references the comments_template.

    if the comments disappear, then copy the modified file to front-page.php and uncomment the line in the page.php. see theme development in codex for an explanation of the theme files.

    If that doesn’t work, then you might test with another theme to see if you can recreate the problem.

    see the disclaimer above….I have not tested this

    in page.php, comment out line 24 that references the comments_template.

    Tried that with TwentyEleven (stock theme), but it does not work.

    If that doesn’t work, then you might test with another theme to see if you can recreate the problem.

    Tried with TwentyTen (stock) theme by commenting same line in loop-page.php, but, still, no luck. 🙁

    Any further idea?

    Here is the link where I’m testing:

    Hmm…link again.

    I solved it…the problem was that I ‘forgot’ how to comment out PHP code. :-/

    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 9 replies - 1 through 9 (of 9 total)
  • The topic ‘TPG Get Posts Forces Comment Box at Bottem of the Page’ is closed to new replies.