Horje
Can you convert my comments form to comment_form arrays? - Wordpress Solution
We would like the below comment form fields to be converted into comment_form arrays. In your response please provide a complete snippet. Arrays that should be filled in are: comment_field must_log_in logged_in_as comment_notes_before comment_notes_after' id_form id_submit title_reply title_reply_to cancel_reply_link label_submit * am I missing any? ** If an array would have no data please place ". . ." as a place holder.
		<section id="leaveresponse">
			<h3 class="cssfonts--17">Leave a Response</h3>

			<?php if (get_option('comment_registration') && !$user_ID) : ?>
			<p>You must be <a rel="nofollow" href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
			<?php else : ?>

			<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post">

				<?php if ($user_ID) : ?>
				<p>Logged in as <a rel="nofollow" href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a rel="nofollow" href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out &raquo;</a></p>
				<?php else : ?>

				<div id="authorData">
				<label for="author">Name <?php if ($req) echo "(required)"; ?></label>
				<input type="name" name="author" id="author" class="commentmeta-textbox cssfonts--16 textbox-grey" value="<?php echo $comment_author; ?>" size="55" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?>>
                <div class="clear"></div>
				
				<label for="email">Email (will not be published) <?php if ($req) echo "(required)"; ?></label>
				<input type="email" name="email" id="email" class="commentmeta-textbox cssfonts--16 textbox-grey" value="<?php echo $comment_author_email; ?>" size="55" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?>>
                <div class="clear"></div>
				
				<label for="url">Website</label>
				<input type="url" name="url" id="url" class="commentmeta-textbox cssfonts--16 textbox-grey" value="<?php echo $comment_author_url; ?>" size="55" tabindex="3">
                <div class="clear"></div>
                </div>

				<?php endif; ?>

				<!-- p>Allowed <abbr title="HyperText Markup Language">HTML:</abbr> tags: <code><?php echo allowed_tags(); ?>

ID); ?>

Solution - 1

Hi, I had coded you a WordPress 3.0 comment form based on the above codes you posted. This form uses the function comment_form(). You can further customization by adding into the $arguments array. You can refer to http://codex.wordpress.org/Function_Reference/comment_form or http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/ for customization examples. Or simply drop me a reply, I will add in your customization.


<section id="leaveresponse">

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

			<p>You must be <a rel="nofollow" href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>

<?php else : ?>

<?php
$arguments = array(
	'id_form'              => 'commentform',
	'id_submit'            => 'submit',
	'title_reply'          => __( '<h3 class="cssfonts--17">Leave a Response</h3>' ),
	'title_reply_to'       => __( 'Leave a Reply to %s' ),
	'cancel_reply_link'    => __( 'Cancel reply' ),
	'label_submit'         => __( 'Post Comment' ),
);
?>
<?php comment_form($arguments); ?>

<?php endif; ?>

</section>

Thanks.





Wordpress

Related
CSS menu issue - Wordpress Solution CSS menu issue - Wordpress Solution
Pagination for list of posts by category? - Wordpress Solution Pagination for list of posts by category? - Wordpress Solution
WordPress MultiSite Migration from LocalHost to Server - Wordpress Solution WordPress MultiSite Migration from LocalHost to Server - Wordpress Solution
Link large attachment to full-size attachment - Wordpress Solution Link large attachment to full-size attachment - Wordpress Solution
Dynamic menu highlighting issues - Wordpress Solution Dynamic menu highlighting issues - Wordpress Solution

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7