How to Remove or Customize Comments and Meta Data in the Twenty Eleven Theme
Content
Many users of the popular Twenty Eleven theme want to customize or remove elements like comment sections, post meta data (such as dates and author bylines), and comment bubbles. This is a common request for creating a cleaner, more tailored website. Based on community discussions, here are the most effective and safe methods to achieve this.
Why You Should Never Edit the Core Theme
A recurring piece of advice from the community is to avoid editing the original Twenty Eleven theme files directly. The Twenty Eleven theme is a default WordPress theme, and having an unedited version is vital for troubleshooting and ensuring compatibility with future WordPress updates. Any changes made directly to the theme will be lost when the theme is updated.
The Recommended Approach: Use a Child Theme or CSS Plugin
Before making any changes, it is highly recommended to first create a child theme. A child theme inherits all the functionality and styling of the parent theme (Twenty Eleven) but allows you to make modifications without affecting the core files. Alternatively, you can use a custom CSS plugin to add your style overrides.
Common Customizations and Their Solutions
1. Removing the "Leave a Reply" Comment Form
Problem: Users want to remove the comment form from their pages or posts.
Solution: This is primarily controlled by WordPress settings, not the theme itself.
- Sitewide: Navigate to Settings → Discussion in your WordPress dashboard and uncheck the option "Allow people to post comments on new articles."
- On Individual Pages/Posts: When editing a specific page or post, ensure the "Discussion" meta box is visible (enable it from the "Screen Options" tab if needed) and uncheck "Allow Comments." You can also manage this quickly from the Pages → All Pages screen using the "Quick Edit" feature.
2. Hiding Post Meta Data (Dates, Author, Categories)
Problem: Users want to remove the "Posted on [date] by [author]" line and other meta information.
Solution: This can be easily accomplished by adding a small CSS snippet to your child theme's style.css file or through a custom CSS plugin.
.entry-header .entry-meta {
display: none;
}
To target only the author text (e.g., remove "by"), you can use this more specific CSS:
.entry-meta .by-author {
display: none;
}
3. Removing or Styling the Comment Count Bubble
Problem: Users report the comment bubble turning into a grey box or want to remove it entirely.
Solution: The appearance of the comment bubble is controlled by CSS. To hide it completely, use the following CSS:
.comments-link {
display: none;
}
To restyle it back to a bubble or with a custom image, you would need to write additional CSS rules to override the existing styles for that element.
4. Removing Grey Borders from Images
Problem: Images have an unwanted grey border or outline.
Solution: Add the following CSS to your child theme or custom CSS plugin to remove the border and padding.
img[class*="align"],
img[class*="wp-image-"],
#content .gallery .gallery-icon img {
border: none;
padding: 0;
}
Conclusion
Customizing the Twenty Eleven theme is straightforward when using the correct methods. Always use a child theme or a custom CSS plugin to preserve your changes and maintain a stable, update-proof website. The CSS solutions provided here are safe, effective, and widely used by the community to achieve a more personalized site design.
Related Support Threads Support
-
[Theme: Twenty Eleven] Leave A Reply Formhttps://wordpress.org/support/topic/theme-twenty-eleven-leave-a-reply-form/
-
[Theme: Twenty Eleven] Remove Bullets from Sidebarhttps://wordpress.org/support/topic/theme-twenty-eleven-remove-bullets-from-sidebar/
-
Twenty Eleven "Custom Fields"https://wordpress.org/support/topic/twenty-eleven-custom-fields/
-
Remove white spaces on top of twenty elevenhttps://wordpress.org/support/topic/remove-white-spaces-on-top-of-twenty-eleven/
-
Can't remove or delete "posted on" dates from postshttps://wordpress.org/support/topic/cant-remove-or-delete-posted-on-dates-from-posts/
-
[Theme: Twenty Eleven] Deleting Templatehttps://wordpress.org/support/topic/theme-twenty-eleven-deleting-template/
-
Comment Date Link in TwentyElevenhttps://wordpress.org/support/topic/comment-date-link-in-twentyeleven/
-
[Theme: Twenty Eleven] Notify Button creating multiple emailshttps://wordpress.org/support/topic/theme-twenty-eleven-notify-button-creating-multiple-emails/
-
[Theme: Twenty Eleven] How Do I Remove The Grey Box Around Pictures?https://wordpress.org/support/topic/theme-twenty-eleven-how-do-i-remove-the-grey-box-around-pictures/
-
[Theme: Twenty Eleven] How do I remove the comment bubble at the top of each post?https://wordpress.org/support/topic/theme-twenty-eleven-how-do-i-remove-the-comment-bubble-at-the-top-of-each-post/
-
[Theme: Twenty Eleven] How Do I Remove The Comments Section from Pages?https://wordpress.org/support/topic/theme-twenty-eleven-how-do-i-remove-the-comments-section-from-pages/
-
[Theme: Twenty Eleven] HowTo – single post sidebar with comments full widthhttps://wordpress.org/support/topic/theme-twenty-eleven-howto-single-post-sidebar-with-comments-full-width/
-
[Theme: Twenty Eleven] How do I prevent a mailto link in text widget from being bold/boldfaced?https://wordpress.org/support/topic/theme-twenty-eleven-how-do-i-prevent-a-mailto-link-in-text-widget-from-being-boldboldfaced/
-
[Theme: Twenty Eleven] The Comment Bubble – How Do I Change It?https://wordpress.org/support/topic/theme-twenty-eleven-the-comment-bubble-how-do-i-change-it/
-
[Theme: Twenty Eleven] How to remove comments?https://wordpress.org/support/topic/theme-twenty-eleven-how-to-remove-comments/
-
[Theme: Twenty Eleven] Show # of Comments Bubble & Remove the Grey Image Outlinehttps://wordpress.org/support/topic/theme-twenty-eleven-show-of-comments-bubble-remove-the-grey-image-outline/
-
[Theme: Twenty Eleven] How to remove "Twitter" button !https://wordpress.org/support/topic/theme-twenty-eleven-how-to-remove-twitter-button/
-
remove date stamp from postshttps://wordpress.org/support/topic/remove-date-stamp-from-posts/
-
[Theme: Twenty Eleven] How to remove from the village news line: Posted; Category; Tags?https://wordpress.org/support/topic/theme-twenty-eleven-how-to-remove-from-the-village-news-line-posted-category-tags/
-
Twenty Eleven – remove all occurrences of "by" texthttps://wordpress.org/support/topic/twenty-eleven-remove-all-occurrences-of-by-text/