Support » Fixing WordPress » Blank comment_post_ID

  • Resolved doctorshim


    I’ve recently written a custom template. I copied most of the markup directly from the default theme. When I attempt to post a comment, I am given a blank page pointing to /wp-comments-post.php.

    Further investigation yielded that the required invisible field, comment_post_ID, retains an empty value. I echoed out the $id variable (which is used to give comment_post_ID its value), and it’s blank!

    I’ve looked absolutly everywhere for some help, but I’m lost. Why is the $id variable blank??

Viewing 1 replies (of 1 total)
  • Solution: The $id variable no longer works. When creating the hidden comment_post_ID field, use $post->ID as its value.

Viewing 1 replies (of 1 total)
  • The topic ‘Blank comment_post_ID’ is closed to new replies.