Submit Comment = Search Results?
-
I am working on a design and I’ve never experienced this kind of behavior before. On the comments form, when you hit “submit comment”, you get search results. It’s like the wp-comments-post form action isn’t there – but it is.
Here’s the comment form:
<?php if ( comments_open() ) : ?> <h3><?php _e('Leave a comment'); ?></h3> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p> <?php else : ?> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <?php if ( $user_ID ) : ?> <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout »</a></p> <?php else : ?> <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="40" tabindex="1" /> <label for="author"><small>Name</small></label></p> <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="40" tabindex="2" /> <label for="email"><small>Mail (required, will not be published)</small></label></p> <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="40" tabindex="3" /> <label for="url"><small>URL</small></label></p> <?php endif; ?> <p><?php do_action('comment_toolbar', 'comment'); ?></p> <p><textarea name="comment" id="comment" cols="45" rows="10" tabindex="4"></textarea></p> <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> </p> <?php do_action('comment_form', $post->ID); ?> </form>Does anyone have any idea why this might be occuring? The resulting URL looks like this:
?s=search+entries&comment=trying+again.&submit=Submit+Comment&comment_post_ID=44&_wp_unfiltered_html_comment=3a4079a5f0I do have a .search class in my CSS, a searchform.php and search results php. I do not have a .submit class.
I have applied the default comment form to the theme and it behaves the same way.
Suggestions would be greatly appreciated!
The topic ‘Submit Comment = Search Results?’ is closed to new replies.