1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | // 修改评论 function zls_comment($comment_form_html_arr){ echo '<style type="text/css"> .comment {border: 1px solid #3165D6;border-radius: 15px!important;} #comment {background:#E8F0FE!important;border: 1px solid #f2f2f2;border-radius: 10px!important;} #comment:hover {background:#E8F0FE!important;border: 1px solid #3165D6;border-radius: 10px!important;} .comment-form input[type=text] {background:#E8F0FE!important;border: 1px solid #f2f2f2;border-radius: 5px!important;box-shadow:none!important;} .comment-form input[type=text]:hover {background:#E8F0FE!important;border: 1px solid #3165D6;border-radius: 5px!important;box-shadow:none!important;} .comment-form input[type=email] {background:#E8F0FE!important;border: 1px solid #f2f2f2;border-radius: 5px!important;box-shadow:none!important;} .comment-form input[type=email]:hover {background:#E8F0FE!important;border: 1px solid #3165D6;border-radius: 5px!important;box-shadow:none!important;} .comment-form input[type=url] {background:#E8F0FE!important;border: 1px solid #f2f2f2;border-radius: 5px!important;box-shadow:none!important;} .comment-form input[type=url]:hover {background:#E8F0FE!important;border: 1px solid #3165D6;border-radius: 5px!important;box-shadow:none!important;} #comments-post {background:#ed1c24!important;} #form-submit {background:#ed1c24!important;} .login form {background:#ed1c24;} .comment-form input {background:#3165D6!important;border:1px solid #3165D6;border-radius: 8px;} .comment-form input:hover {background:#3979E7;border:1px solid #3979E7;border-radius: 8px;} .comment-respond {background:#ffffff!important;} </style>'; } add_filter('comment_form_defaults','zls_comment'); |
1 2 3 4 5 6 7 8 9 10 11 12 13 | .comment-form-url .comment-form-email .comment-form-author .comment-form-comment .comment-form .comment-reply-title .comment-notes .form-submit .comment-form input .comment-form input[type=text] .comment-form input[type=email] .comment-form input[type=url] #comment |
==================================================
Wordpress 修改评论页面[二]
1. .comment-form-url{}
1-1. 打开functions.php
1 2 | cd /home/wwwroot/default/bndstone/wp-content/themes/flatsome/ vi functions.php |
1-2. 加入如下代码:
1 2 3 4 5 6 7 8 9 | // 修改评论 function zls_comment($comment_form_html_arr){ echo '<style type="text/css"> .comment-form-url {background:#ed1c24!important;} // .comment-form-url {color:#ed1c24!important;} </style>'; } add_filter('comment_form_defaults','zls_comment'); |
2. .comment-form-email {}
1 | .comment-form-email {background:#ed1c24!important;} // .comment-form-email {color:#ed1c24!important;} |
3. .comment-form-author {}
1 | .comment-form-author {background:#ed1c24!important;} // .comment-form-author {color:#ed1c24!important;} |
4. .comment-form-comment {}
1 | .comment-form-comment {background:#ed1c24!important;} // .comment-form-comment {color:#ed1c24!important;} |
5. .comment-form {}
1 | .comment-form {background:#ed1c24!important;} // .comment-form {color:#ed1c24!important;} |
6. .comment-reply-title {}
1 | .comment-reply-title {background:#ed1c24!important;} // .comment-reply-title {color:#ed1c24!important;} |
7. .comment-notes {}
1 | .comment-notes {background:#ed1c24!important;} // .comment-notes {color:#ed1c24!important;} |
8. .form-submit {}
1 | .form-submit {background:#ed1c24!important;} // .form-submit {color:#ed1c24!important;} |
9. .comment-form input {}
1 | .comment-form input {background:#ed1c24!important;} // .comment-form input {color:#ed1c24!important;} |
10. #comment {}
1 | #comment {background:#ed1c24!important;} // #comment {color:#ed1c24!important;} |
11. .comment-respond {}
1 | .comment-respond {background:#ed1c24!important;} // .comment-respond {color:#ed1c24!important;} |