Ever looked at your WordPress comment form and thought, “Meh”? You’re not alone. The default styling is… well, basic. But here’s the good news — you can easily spice it up! No need to be a coding wizard. Just a few tweaks with CSS and a little HTML magic can make a big difference.
Contents
Why Style the Comment Form?
Because first impressions count! Your comment section is a space for conversation. It should look welcoming, modern, and user-friendly. A well-designed comment form encourages more interaction. And more interaction? That’s blog gold.
What You’ll Learn
- How to target the WordPress comment form with CSS
- How to style form fields for a better look
- How to add placeholders and change text
- Bonus ideas to make your comment form stand out
1. Start with a Child Theme
Before making changes, use a child theme. This keeps your custom styling safe, even when your main theme updates. If you don’t have a child theme yet, create one or use a plugin like Child Theme Configurator.
2. Inspect the Comment Form
Use your browser’s Inspector tool (right-click, then “Inspect”) to peek at the comment-form
class and its elements. You’ll see things like:
.comment-form-author
.comment-form-email
.comment-form-comment
#submit
These are your targets for styling!
3. Add Custom CSS
Now it’s time to add your own styles. Go to your WordPress Dashboard, then:
- Appearance > Customize
- Click Additional CSS
- Paste in the code below
/* Comment form container */
.comment-form {
background-color: #f9f9f9;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
/* Form labels */
.comment-form label {
font-weight: bold;
margin-bottom: 5px;
display: block;
}
/* Input fields */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 5px;
margin-bottom: 20px;
}
/* Submit button */
#submit {
background-color: #0073aa;
color: white;
padding: 12px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
#submit:hover {
background-color: #005f8d;
}
This will give your form a light, modern look. You can change colors and padding to match your site style.

4. Add Placeholder Text
Want to guide users with friendly placeholder text? Add this little PHP snippet to your child theme’s functions.php
file:
function custom_comment_form_fields($fields) {
$fields['author'] = str_replace('value=""', 'placeholder="Your Name"', $fields['author']);
$fields['email'] = str_replace('value=""', 'placeholder="Your Email"', $fields['email']);
return $fields;
}
add_filter('comment_form_default_fields', 'custom_comment_form_fields');
function custom_comment_field($field) {
$field = str_replace('<textarea', '<textarea placeholder="Write your comment here..."', $field);
return $field;
}
add_filter('comment_form_field_comment', 'custom_comment_field');
This makes the form feel more personal, less robotic!
5. Style the Placeholder
You can even style the placeholder text itself! Back in your Additional CSS box, add:
::placeholder {
color: #888;
font-style: italic;
}
So slick, right?
6. Hide the Website Field (Optional)
If you don’t want users to leave links (hello spam!), you can hide the website field like this:
.comment-form-url {
display: none;
}
Quick and clean!
7. Add Icons for Style
You can add icons with a little extra HTML. It’s easiest if you use a plugin like Font Awesome.
Once added, modify the comment form with this snippet in your functions.php
:
function add_icons_to_form_fields($fields) {
$fields['author'] = '<label for="author"><i class="fas fa-user"></i> Name</label>' . $fields['author'];
$fields['email'] = '<label for="email"><i class="fas fa-envelope"></i> Email</label>' . $fields['email'];
return $fields;
}
add_filter('comment_form_default_fields', 'add_icons_to_form_fields');
Fancy, eh?
8. Add Animation on Focus
Let’s make input fields feel interactive!
.comment-form input:focus,
.comment-form textarea:focus {
border-color: #0073aa;
box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
transition: all 0.3s ease-in-out;
}
This makes the form feel alive when someone starts typing.
9. Mobile-Friendly Styling
Don’t forget about mobile users. Use media queries to adjust your form for smaller screens:
@media (max-width: 600px) {
.comment-form {
padding: 20px;
}
#submit {
width: 100%;
}
}
Now everyone has a smooth commenting experience — big or small screen!

10. Add a Custom Message
Want to add a custom message above the form? Try this snippet:
function custom_comment_text($defaults) {
$defaults['comment_notes_before'] = '<p class="comment-note">We love hearing your thoughts! Keep it kind and relevant. 🙂</p>';
return $defaults;
}
add_filter('comment_form_defaults', 'custom_comment_text');
This little touch makes your blog feel more human.
11. Bonus: Add Some Fun with Emojis
Did you know you can enable emoji support in your comments? Just install a plugin like “WP Emoji One” or enable the default emoji script. Then encourage your users to drop a 😀 or 🚀!
You can even add an emoji picker with JavaScript for extra fun. How cool is that?
12. Test Everything
After making all these changes, test your form!
- Try submitting comments
- Check on mobile and desktop
- Use different browsers
Make sure everything works smoothly. Styling is great — but functionality is king!
In Conclusion
Your comment section doesn’t have to be boring. With just a few lines of code, a splash of CSS, and a dash of creativity, you can give your comment form a total makeover.
To recap:
- Use a child theme
- Customize with CSS
- Add placeholders and custom icons
- Test on all devices
Now go and style your comment form like a boss. 🧑🎨
Happy blogging!