{"id":540,"date":"2010-10-09T23:33:53","date_gmt":"2010-10-09T21:33:53","guid":{"rendered":"http:\/\/www.kavdesign.net\/blog\/?p=540"},"modified":"2010-10-09T23:34:10","modified_gmt":"2010-10-09T21:34:10","slug":"how-to-style-wordpress-default-comment-form","status":"publish","type":"post","link":"https:\/\/www.kavdesign.net\/blog\/coding\/how-to-style-wordpress-default-comment-form\/","title":{"rendered":"How to style wordpress default comment form for TwentyTen?"},"content":{"rendered":"<p>Go to your theme open comments.php if you have one:<\/p>\n<p>and find the line:<\/p>\n<p>comment_form();<\/p>\n<p>Replace it with this code which you could change as you like:<\/p>\n<pre>$commenter = wp_get_current_commenter();\r\n\r\n$fields =\u00a0 array(\r\n 'author' =&gt; '&lt;p&gt;' . '&lt;input id=\"author\" name=\"author\" type=\"text\" value=\"' . esc_attr( $commenter['comment_author'] ) . '\" size=\"30\"' . $aria_req . ' \/&gt;&lt;label for=\"author\"&gt;' . __( 'Name' ) . '&lt;\/label&gt; ' . ( $req ? '&lt;span&gt;*&lt;\/span&gt;' : '' ) .\r\n '&lt;\/p&gt;',\r\n 'email'\u00a0 =&gt; '&lt;p&gt;&lt;input id=\"email\" name=\"email\" type=\"text\" value=\"' . esc_attr(\u00a0 $commenter['comment_author_email'] ) . '\" size=\"30\"' . $aria_req . ' \/&gt;&lt;label for=\"email\"&gt;' . __( 'Email' ) . '&lt;\/label&gt; ' . ( $req ? '&lt;span&gt;*&lt;\/span&gt;' : '' ) .\r\n '&lt;\/p&gt;',\r\n 'url'\u00a0\u00a0\u00a0 =&gt; '&lt;p&gt;&lt;input id=\"url\" name=\"url\" type=\"text\" value=\"' . esc_attr( $commenter['comment_author_url'] ) . '\" size=\"30\" \/&gt;&lt;label for=\"url\"&gt;' . __( 'Website' ) . '&lt;\/label&gt;' .\r\n '&lt;\/p&gt;',\r\n);\r\n\r\n$defaults = array(\r\n 'fields'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 =&gt; apply_filters( 'comment_form_default_fields', $fields ),\r\n);\r\n\r\ncomment_form($defaults);<\/pre>\n<p>For more information check the wordpress docs: <a href=\"http:\/\/codex.wordpress.org\/Template_Tags\/comment_form\" target=\"_blank\">http:\/\/codex.wordpress.org\/Template_Tags\/comment_form<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go to your theme open comments.php if you have one: and find the line: comment_form(); Replace it with this code which you could change as&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/www.kavdesign.net\/blog\/coding\/how-to-style-wordpress-default-comment-form\/\">Continue reading<span class=\"screen-reader-text\">How to style wordpress default comment form for TwentyTen?<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[9,82],"tags":[118],"class_list":["post-540","post","type-post","status-publish","format-standard","hentry","category-coding","category-wordpress","tag-comments","entry"],"_links":{"self":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/comments?post=540"}],"version-history":[{"count":3,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/540\/revisions"}],"predecessor-version":[{"id":543,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/540\/revisions\/543"}],"wp:attachment":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/media?parent=540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/categories?post=540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/tags?post=540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}