Support » Fixing WordPress » Comment Form Outside of WP

  • 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:

    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.


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comment Form Outside of WP’ is closed to new replies.