• I’m running into some issues with formatting my comments form. It’s a little difficult to describe, but when looking at a single post, the “LEAVE A COMMENT” headline is bumped up flush with the last comment in the string. I’ve tried simple
    tags, which used to work fine, but something is preventing it now.

    This happened recently when I was altering the code and I can’t figure out where in the process it occurred. Any help would be greatly appreciated.

    Here’s a sample page:

    https://www.incontention.com/?p=831

    And the comment form code:

    <!– Comment Form –>
    <?php if (‘open’ == $post-> comment_status) : ?>

    <?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>

    <p class=”unstyled”>You must /wp-login.php?redirect_to=<?php the_permalink(); ?>”>log in to post a comment.</p>

    <?php else : ?>

    <h3 id=”respond” class=”comments_headers”>Leave a Comment</h3>
    <form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”comment_form”>

    <?php if ( $user_ID ) { ?>

    <p class=”unstyled”>Logged in as /wp-admin/profile.php”><?php echo $user_identity; ?>. /wp-login.php?action=logout” title=”<?php _e(‘Log out of this account’) ?>”>Logout »</p>

    <?php } ?>
    <?php if ( !$user_ID ) { ?>
    <p><input class=”text_input” type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” tabindex=”1″ /><label for=”author”>Name</label></p>
    <p><input class=”text_input” type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” tabindex=”2″ /><label for=”email”>Email</label></p>
    <p><input class=”text_input” type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” tabindex=”3″ /><label for=”url”>Web site</label></p>
    <?php } ?>
    <!–<p><small>XHTML: You can use these tags: <?php echo allowed_tags(); ?></small></p>–>

    <p><textarea class=”text_input text_area” name=”comment” id=”comment” rows=”7″ tabindex=”4″></textarea></p>

    <?php if (function_exists(‘show_subscription_checkbox’)) { show_subscription_checkbox(); } ?>

    <p>
    <input name=”submit” class=”form_submit” type=”submit” id=”submit” src=”<?php bloginfo(‘template_url’) ?>/images/submit_comment.gif” tabindex=”5″ value=”Submit” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
    </p>

    <?php do_action(‘comment_form’, $post->ID); ?>

    </form>

    <?php endif; // If registration required and not logged in ?>

    <?php endif; // if you delete this the sky will fall on your head ?>
    </div> <!– Close #comments container –>
    <div class=”clear flat”></div>
    <?php } ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey kristapley,

    Looks like your problem is further up in the page.

    Shouldn’t be that hard to do with CSS, but your code is obviously a bit screwy.

    I’d really encourage you to fix as many of the validation errors as you can as these will definitely contribute to the rendering of the page.

    There are a lot of them, and some you won’t be able to do anything about, but the ones you can fix, you should, in my opinion.

    I know that’s not a quick fix, but it could be one that pays off in the long run.

    You should be able to increase the space simply by adding the following to your CSS file:

    h3#respond {padding-top:1em;}

    Doesn’t work now, because you’ve got an incorrectly nested list

    Thread Starter kristapley

    (@kristapley)

    Thanks very much. I’ll start going through those errors. I didn’t realize there were so many.

    Yeah, they can sneak up on you and can compound themselves. So the validator can show 10 errors (in your case a few more), but by fixing one of them, others will be sorted out.

    I have a feeling this will be the case on your site. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comment form question…’ is closed to new replies.