• danielgutekunst

    (@danielgutekunst)


    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 ?

    Thread Starter danielgutekunst

    (@danielgutekunst)

    What don’t you understand? e.g. you have a static site S:
    S := http://www.domain.net/something/strange.php

    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.

    Root

    (@root)

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

    Cypher

    (@cypher)

    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.

    Regards

    philpeeps

    (@philpeeps)

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

    Root

    (@root)

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

    philpeeps

    (@philpeeps)

    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)

    Thread Starter danielgutekunst

    (@danielgutekunst)

    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…

    philpeeps

    (@philpeeps)

    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…

    http://codex.wordpress.org/pages#Pages_can_use_Different_Templates

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

    srpittman

    (@srpittman)

    I am using the Pages feature to create additional content pages for my site at http://www.tpimagazine.net. 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….

    jinsan

    (@jinsan)

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

    <?php }?>
    <p class="comments_link">
    <?php
    $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');
    ?>
    </p>

    <?php
    if ($pcount_lp == 1){
    comments_template();
    } ?>
    <?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?

    vcourtney

    (@vcourtney)

    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– http://www.virtualcourtney.com/guestbook/ )

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