We've integrated a WP instance into our website, and I was wondering how to render the comments template into the page.

I've tried simply adding:

    comments_template( '', true );

But it doesn't seem to work (also there are no errors shown).

I guess we are missing some includes and inits. Any help would be appreciated.

  • Do you have a comments.php file in your theme?
    – Howdy_McGee
    Jul 28 '14 at 16:33

Could be as simple as using the full function in the template file:

<?php comments_template( '', true ); ?>

Be sure you have a comments.php file in the theme folder.

And be sure you're using the full loop:


$posts = get_posts('numberposts=10&order=ASC&orderby=post_title');
foreach ($posts as $post) : setup_postdata( $post ); ?>
<?php the_date(); echo "<br />"; ?>
<?php the_title(); ?>    
<?php the_content(); ?>

<?php comments_template( '', true ); ?>


See Integrating WordPress with Your Website « WordPress Codex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.