I have pass comment_post_id with comments_template($file = ‘/comments.php’, $separate_comments = false,$comment_post_id) like this.In my comments_template function i have received this variable like this
function comments_template( $file = ‘/comments.php’, $separate_comments = false , $attr ) {
global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage ,$post_related_id;

Now i want to pass $post_related_id as the post_id for the comment.Means i want to submit the comment on this($post_related_id) post id

Read more here: How to pass Post_id with comments_template function to sumbit comment on passed post_id in wordpress


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: