WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Has anyone run across a way to build a page of posts that includes the comments and discussion form(s) for each post inline with the list?

I tried this a few ways today and found it quite difficult.

For example the list would be pseudo-code like


One of the ways I tried to accomplish this (which seemed the easiest really) was to use single.php as a page template and then just run a manual query_posts in it.

I was able to get it to work by calling comment_form('', the_ID()); instead of comments_template( 'comments.php', true );

HOWEVER that solution does NOT use my comments template and rather throws this div in there with an id of "respond" that isn't anywhere in my theme.

There is some magic that happens on a page or single that you can't easily override when you try to do it in one big list.

Any help would be appreciated and respected.

Template Name: Blog


$args = array(
'category' => '7',
'posts_per_page' => '10',
query_posts( $args );

<div id="content">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>

            <h1><a href="<?php the_permalink() ?>" title="<?php        the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
            <?php edit_post_link('<small>Edit this entry</small>','',''); ?>
            <?php if ( has_post_thumbnail() ) { /* loades the post's featured thumbnail, requires Wordpress 3.0+ */ echo '<div class="featured-thumbnail">'; the_post_thumbnail(); echo '</div>'; } ?>
            <div class="post-content">
                <?php the_content(); ?>
                <?php wp_link_pages('before=<div class="pagination">&after=</div>'); ?>

        <div id="post-meta">
                Posted on <?php the_time('F j, Y'); ?> at <?php the_time() ?>

                <?php the_tags('Tags: ', ', ', ' '); ?>
                Receive new post updates: <a href="<?php bloginfo('rss2_url'); ?>" rel="nofollow">Entries (RSS)</a>
                <br />
                Receive follow up comments updates: <?php comments_rss_link('RSS 2.0'); ?>

        <?php /* If a user fills out their bio info, it's included here */ ?>

    </div><!-- #post-## -->

    comment_form('', the_ID());
    //comments_template( 'comments.php', true ); ?>

<?php endwhile; /* end loop */ ?>

share|improve this question

closed as too localized by toscho Feb 18 '13 at 23:45

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.