Support » Plugins » Commenting on static pages

  • I have static pages (php) that are not part of WordPress (but I could load any WP file from these).

    Someone should be able to comment on these pages like on Blog entries. It should be able to accomplish this in some way…

    any ideas?

Viewing 14 replies - 1 through 14 (of 14 total)
  • I have NO idea what you are talking about.. Maybe a URI to show ?

    What don’t you understand? e.g. you have a static site S:
    S :=

    And you want to allow users to add comments on S. Instead of using a new script, it would be nice, to use the functions WP provides for storing and printing comments.

    A static page with comments is not static. It is a blog page with a single post.
    Its all built in.

    However, if you are including _seperate_ PHP files on your webpage that aren’t controlled by WordPress, then you’d have to implement your own commenting on it.

    You could use the Pages feature in WP 1.5 to create static pages and thus allow commenting on it.


    just include the commenting template tags from your loop in your page template

    Well there has been no mention of a page template. The pages are being described as not part of WP.

    oops…I didn’t read carefully enough…

    You could add the RunPHP plugin and re-write the pages to WP-Pages with the <phpcode></phpcode> tags from RunPHP 🙂

    Or if the pages are used at 2 different location you could use the require_once() function of PHP (with RunPHP etc.)… (just an idea)

    BY the way the I have no idea-tag should not be here was posted on another thread (I thought actually :P)

    There is no solution at this point.

    I postet this with care under “Plugins and Hacks” because I really need a hack.

    I thought about this way:
    1. Create a pseudo page with no content, just to have a new id for a new comment slot.
    2. Include WP headers in my own page (outter WP) and use the appropriate comment code with the id of the pseudo page…

    i dont understand why you do not use the pages feature instead. Is there something on those pages that cannot be included on a wordpress page template?

    A link would help so we can see what you are trying to include on this page, but AFAIK, you can include any php you need on a page template, have a loop looking for the page and comments and be done with it…

    I am using a static page with comments on my “about” page on my site with no problems.

    I am using the Pages feature to create additional content pages for my site at Although I have the option checked to “Allow Comments” on the newly created pages, the option to post comments on the page do not show up. I went to philpeeps blog and his site has multiple pages with the ability to post comments on the additional pages. What do I need to do or is something broke?

    When logged in as admin the option that shows at the bottom of the page is “edit this…”, but when I’m logged out, no option is displayed….

    why don’t you create a template for your pages, and add:

    <?php }?>
    <p class="comments_link">
    $comments_img_link = '<img src="' . get_stylesheet_directory_uri() . '/images/comments.gif" title="comments" alt="*" />';
    comments_popup_link('No Comments', $comments_img_link . ' 1 Comment', $comments_img_link . ' % Comments');

    if ($pcount_lp == 1){
    } ?>
    <?php }?>

    or something liket aht to the template. Enable comments in the page with the checkbox and I think it will work. Just copy the comment part of your index file into the page template file. Or will this not work?

    srpittman: What I did to get comments on a static page was basically yoink the wp loop–including the comments loop–from index.php and throw it in a new page template. Write your content in the “write page” area, make sure you use your tweaked template, and you should be fine.
    (I made a guestbook page– )

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Commenting on static pages’ is closed to new replies.