I have three pages, and I want them all to display the comments form from a post with id=343. What code would I use within the pages to make that happen?
Here is what I’ve tried:
<?php
$id=343; // sample, I get the latest post id of a particular category
comments_template();
?>
But that doesn’t work, it just shows the blank comment form from the page. Any thoughts / suggestions?
Use
get_comments()
and pass the post ID as parameter:Related: Bug #20572 (
$post_id
not passed tocomment_open()
fromcomment_form()
) was fixed just two days ago.use this if you want to show comment on a specific post
is_single('1')