kala-tamin Edit Wordpress comment form (just add a class to the text inputs)

Edit Wordpress comment form (just add a class to the text inputs)

I'm using the default twenty_ten theme that comes with the latest Wordpress and modifying it. I just want to add a class to certain text inputs within the new comment form (specifically to add

to make it play nice with Blueprint CSS framework).

I can't locate the place to do this. Not au fait with PHP but able to work my way around it in most cases - just can't seem to locate the form here.

Any help appreciated.

how to search in wordpress from the database mysql


sexy bookmark plugin breaks my site in ie6
The comment form is output by the WordPress comment_form() function. difficulty with japanese character encoding in wordpress To add a CSS class to specific inputs, you must change the $fields argument when it's called from the bottom of the TwentyTen comments.php file.. Editors for different parts of Wordpress In the case below I've added class="text" to the author input field:. how can i use ugly slugs in wordpress using non-western character?
<?php     $fields =  array(         'author' => '<p class="comment-form-author">' . Looking For a “Camera Flash” like Page Transition'<label for="author">' . How can I display posts from the other sites in a WordPress multisite setup?__( 'Name' ) . Active menu state in wordpress'</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input class="text" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',         'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .           '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',         'url'   => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',     );       comment_form(array('fields'=>$fields));  ?> 
Alternatively you could create a filter in your theme's functions.php this added the input class for you:.
function my_comment_fields($fields) {     foreach($fields as $field){          // Add the class to your field's input     }     return $fields; } add_filter('comment_form_default_fields','my_comment_fields'); 


Login in to you Control Panel. Open wp-includes folder from File Manager. Select comment-template.php and Click Edit. Go to the line 1541 or search for ‘’ Near to this you must see “Your email address will not be published. Required fields are marked *”. $fields = array( 'author' => '' . '' . __( 'Name' ) . ' ' . ( $req ? '*' : '' ) . '',. Read more at aTechguide.com http://atechguide.com/edit-comment-form-wordpress.

83 out of 100 based on 43 user ratings 743 reviews