Created
August 21, 2012 10:01
-
-
Save i-like-robots/3414127 to your computer and use it in GitHub Desktop.
Wordpress custom comment form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( comments_open() ) : ?> | |
<form action="<?php echo site_url('/wp-comments-post.php') ?>" method="post" id="comments"> | |
<ul class="form-collection"> | |
<?php if ( is_user_logged_in() ) : global $current_user; ?> | |
<li> | |
<span class="field-hint">Logged in as <?php echo $current_user->user_login ?></span> | |
</li> | |
<?php else : ?> | |
<li> | |
<label for="comment-author" class="field-label">Name</label> | |
<input type="text" name="author" id="comment-author" /> | |
</li> | |
<li> | |
<label for="comment-email" class="field-label">Email</label> | |
<input type="email" name="email" id="comment-email" /> | |
</li> | |
<?php endif ?> | |
<li> | |
<label for="comment-body" class="field-label">Comment</label> | |
<textarea name="comment" id="comment-body"></textarea> | |
</li> | |
<li class="button-field"> | |
<input type="submit" name="submit" value="Post comment" /> | |
<?php | |
comment_id_fields(); | |
if ( current_user_can( 'unfiltered_html' ) ) | |
{ | |
wp_nonce_field( 'unfiltered-html-comment_' . get_the_ID(), '_wp_unfiltered_html_comment', false ); | |
} | |
?> | |
</li> | |
</ul> | |
</form> | |
<?php else : ?> | |
<p class="nocomments"> | |
Comments are closed for this article. | |
</p> | |
<?php endif ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi nice sharing but i have bugged in a few places my site will check if it fit. https://www.paykasakartsatinal.gen.tr/