Back to Community

How to Customize the Comment Form in the Twenty Twenty Theme

18 threads Sep 16, 2025 ThemeTwenty twenty

Content

Customizing the comment section is a common request for users of the Twenty Twenty theme. Whether you want to change the text, reorder fields, adjust styling, or remove elements like the website URL field, this guide covers the most effective methods.

Common Comment Form Customization Requests

Based on community discussions, users frequently want to:

  • Change the "Leave a Reply" heading and notes text.
  • Remove the website URL field from the comment form.
  • Alter the visual styling (fonts, borders, button colors) with CSS.
  • Reorder the position of elements, such as moving notes below the email field.
  • Keep comments permanently expanded instead of having them scroll into view.

Method 1: Using a Child Theme and Filters (Advanced)

The most powerful way to modify the comment form is by using WordPress filters in your child theme's functions.php file. This approach allows you to change the form structure and fields without editing core theme files.

Removing the Website URL Field

To remove the website field, add the following code to your child theme's functions.php file:

function twenty_twenty_remove_comment_url($fields) {
    if(isset($fields['url'])) {
        unset($fields['url']);
    }
    return $fields;
}
add_filter('comment_form_default_fields', 'twenty_twenty_remove_comment_url');

Changing the "Leave a Reply" Text and Notes

To modify the text strings, use the comment_form_defaults filter:

function twenty_twenty_modify_comment_strings($defaults) {
    $defaults['title_reply'] = 'Your Custom Heading Text';
    $defaults['comment_notes_before'] = 'Your custom text before the fields.';
    return $defaults;
}
add_filter('comment_form_defaults', 'twenty_twenty_modify_comment_strings');

Method 2: Styling with Custom CSS

For visual changes like fonts, borders, and button styles, use the Customizer's "Additional CSS" section.

Example: Styling the Comment Button and Inputs

The following CSS adds rounded corners to the input fields and the submit button, changes the button color, and capitalizes its text.

/* Style input fields and textarea */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    border-radius: 8px;
}

/* Style the submit button */
.comment-form input[type="submit"] {
    border-radius: 8px;
    background-color: #0073aa;
    text-transform: uppercase;
}
.comment-form input[type="submit"]:hover {
    background-color: #005177;
}

Method 3: Using a Plugin

For users who are not comfortable with code, several WordPress plugins can provide a user interface for managing comment form fields. Plugins like "Custom Comment Fields" or "WP Comment Fields" can often achieve these modifications without writing code.

Important Considerations

  • Child Theme: Always use a child theme when adding custom code to prevent your changes from being overwritten by theme updates.
  • Theme Updates: The Twenty Twenty theme is regularly updated. The methods described here are standard WordPress practices and are likely to remain functional after updates, but it's good practice to test after a theme update.
  • Plugin Conflicts: Some changes, particularly those involving comment pagination or the display of HTML, are controlled by WordPress core, not the theme. For issues like allowing HTML in comments, solutions would need to be applied at the WordPress level.

By following these methods, you can tailor the Twenty Twenty comment section to better fit your website's design and functionality needs.

Related Support Threads Support