Forums
Home / Fixing WordPress / Comment Form Outside of WP
(@hauf9301)
11 years, 6 months 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!
Is this not possible?
(@peter_l)
Use wordpress functions outside of wordpress… of course not.
(@hauf9301)
11 years, 6 months 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:
But even though I am logged in I see “You must be logged in to comment.” instead of a comment form.
Thanks!