• Resolved x0ner

    (@x0ner)


    I have a custom template I use that goes along with a custom post type. For the life of me I can not figure out how to get comments to properly save for this post type. I have managed to get the comment box showing up on the post, but when I go to submit the comment I am just directed to a blank page (wp-comments-post.php). I did some research on the error, but no ones issue seemed quite like mine (they didn’t mention custom post types). Any help would be greatly appreciated!

    Here is what I have on my custom template:

    <div id="comments" class="box2">
        <?php comments_template(); ?>
    </div>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you modified comments.php any, and what theme are you using? Also, have you disabled all your plugins and tried submitting a comment? You might have a plugin that is interfering with the comments.

    Thread Starter x0ner

    (@x0ner)

    I did not modify comments.php at all. This is just a plain WordPress installation using the tentwenty theme. I have not disabled plugins, but experience the same behavior even on a native install. Is it supposed to be as easy as just including the comments_template even if the template is custom?

    Thread Starter x0ner

    (@x0ner)

    Solved my own problem. The issue was that the comment_ID was never getting set properly. I was not able to track down where this value was getting pulled from, but I modified the template to include the proper id (comment_post_ID) within the hidden input tag. Doing so then populated the value of the post and therefore associated my comment submit with an actual post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom template comment fail’ is closed to new replies.