[resolved] Blank comment_post_ID (2 posts)

  1. doctorshim
    Posted 9 years ago #

    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??

  2. doctorshim
    Posted 9 years ago #

    Solution: The $id variable no longer works. When creating the hidden comment_post_ID field, use $post->ID as its value.

Topic Closed

This topic has been closed to new replies.

About this Topic