• Hi! Right, brace yourselves. This is going to be a long post.

    So I’m having the same problem that so many others have had. When I try to post a comment I am directed to a blank wp-comments-post.php page. Looking through Firebug reveals that no html or css is present. This happens every time whether I am logged in or not, and the comment never goes through. If I switch to a default theme, everything works fine, leading me to believe that there is a problem with my theme. Here’s where I started:

    1) WordPress Theme Tutorial. It’s an excellent, comprehensive tutorial for a newb like me. I followed it to the tee, got my blog sort of working, then spent awhile mastering the style sheet. By the way, my test installation is at this address: https://www.gutenbergday.org/blog_0101.

    Now, however, the only thing not working that I really must have is comment posting. This is what I have tried:

    2) This post identified a problem with this line of code missing:

    <?php comment_id_fields(); ?>

    That, however, is clearly present in my comments.php file.

    3) I tried the phpMYadmin fix too. The table was successfully repaired or checked out ok, but nothing has changed.

    4) Some have had problems with Akismet. The plug-in is not and has never been activated on my blog as far as I know. It is installed, but not running.

    5) One person teetered on the verge of a mental breakdown over this line of code:

    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />

    That, it turns out, is exactly how the line looks in my comments.php. So I tried her other two alternatives:

    <input type="hidden" name="comment_post_ID" value="<?php the_ID(); ?>" />

    and

    <input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />

    …success was met with neither.

    6) I removed white space at the bottom of wp-comments-post.php has per this post to no avail.

    7) I tried replacing my comments.php with this one as well as with the comments.php included with the two default themes. Nada.

    8) I also tried making a completely separate, fresh install and dropping in the theme I had developed. Fail to the power of 8.

    So. Where should I go next? Any thoughts? No idea is too hair-brained or outrageous for me to consider.

Viewing 4 replies - 16 through 19 (of 19 total)
  • After that, you should read the manual.

    https://codex.www.ads-software.com/The_Loop

    Yes you’re totally missing the loop code from your single.php …

    Review the page above, or see your index file which has a loop for an example… (or look at the single.php in the default theme) …

    You’re missing some essential code. I think once you add back this code you’ll find the initial problem disappears… ??

    A very basic loop … just as an example..

    <?php if( have_posts() ) : ?>
      <?php while( have_posts() ) : the_post(); ?>
    
        // CODE THAT IS REPEATED FOR EACH POST GOES HERE
    
      <?php endwhile; ?>
    <?php endif; ?>

    Thread Starter vaguely_clear

    (@vaguely_clear)

    Hahaha, ahaha. Well, I’m a blubbering idiot. I (finally) had the good sense to compare my single.php to the final Google code version and needless to say it was way off.

    You both deserve medals for your patience. Without knowing exactly what part of what file was missing, I would probably still be doing this next month.

    Anyway, everything works peachy now. Thanks a million!

    Happy to hear you fixed your problem, and thanks for posting back to let us know.

    ??

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Another blank wp-comments-post.php problem…’ is closed to new replies.