WordPress.org

Forums

Comment Form Outside of WP (3 posts)

  1. hauf9301
    Member
    Posted 2 years ago #

    Hello,

    Is there a way to display the comment form in a directory outside of WordPress?

    I want to display the form in my loop in the following file
    /index.php (one dir higher then WP install)

    WordPress is installed in the following directory:
    /blog/

    I am using the following code:

    <?php require('blog/wp-blog-header.php'); ?>
    <?php query_posts('showposts=3&category_name=test'); ?>
    <?php while (have_posts()) : the_post(); ?>
        <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
        <?php the_content(); ?>
        <?php comments_popup_link('no comments', '1 comment', '% comments'); ?></p>
        <?php $withcomments=true; comments_template(); ?>
    <?php endwhile; ?>

    But even though I am logged in I see "You must be logged in to comment." instead of a comment form.

    Thanks!

  2. hauf9301
    Member
    Posted 2 years ago #

    Is this not possible?

  3. Peter_L
    Member
    Posted 2 years ago #

    Use wordpress functions outside of wordpress... of course not.

Topic Closed

This topic has been closed to new replies.

About this Topic