How to Fix Duplicate or Missing Title Tags in Twenty Eleven
Content
Many users of the Twenty Eleven theme encounter issues with their page titles. A common problem reported across support forums is the theme generating duplicate title tags, often combining the site name with the post title in a way that conflicts with SEO plugins like Yoast SEO. Conversely, other users find their titles are missing entirely due to custom CSS. This guide will explain why these issues occur and provide the most common solutions.
Why This Happens
The Twenty Eleven theme has built-in functionality for generating title tags. When a plugin like Yoast SEO is installed, both the theme and the plugin may try to output a title tag, leading to duplication. In other cases, users or child themes might apply CSS that inadvertently hides titles from view, making them seem missing to visitors while they remain in the page's HTML code.
Common Solutions
1. Resolving Duplicate Title Tags with an SEO Plugin
If you are using an SEO plugin and see two title tags, the plugin likely has a setting to control the theme's native title output.
- Navigate to your SEO plugin's settings (e.g., Yoast SEO → Search Appearance).
- Look for an option often labeled "Force rewrite titles" or "Remove title present." Enabling this can often suppress the theme's title output, leaving only the plugin's optimized title.
- If this setting does not resolve the issue, the next step is to add a code snippet to your child theme's
functions.phpfile. This will completely disable the theme's title tag function.
2. Disabling the Theme's Title Tag via Code (Advanced)
For a more direct solution, you can remove the theme's title tag function. It is crucial to do this in a child theme to preserve your changes after theme updates.
// Remove Twenty Eleven theme title tag
function remove_theme_title_tag() {
remove_action('wp_head', '_wp_render_title_tag', 1);
}
add_action('init', 'remove_theme_title_tag');
Warning: Only edit your child theme's functions.php file. Editing the parent theme directly is not recommended, as all changes will be lost when the theme is updated.
3. Showing or Hiding the Visible Page/Post Title
It's important to distinguish between the HTML <title> tag (for SEO and the browser tab) and the visible <h1> title on the page itself. To hide the visible page title, you can use Custom CSS. This is a visual change and does not affect the SEO title tag.
/* Hide the visible entry title on pages and posts */
.entry-title {
display: none !important;
}
You can add this CSS through the WordPress Customizer under "Additional CSS." If your titles are already missing, check your child theme's CSS for a rule like this and remove or modify it.
Conclusion
Title issues in Twenty Eleven typically stem from a conflict between the theme and an SEO plugin or from custom CSS. Using your plugin's settings is the first and safest step. If that fails, carefully adding code to your child theme's functions.php file or Custom CSS can provide a definitive solution. Always remember to use a child theme for any code modifications to ensure your work is not overwritten.
Related Support Threads Support
-
[Theme: Twenty Eleven] Read more link does not displayed when there is no excerpthttps://wordpress.org/support/topic/theme-twenty-eleven-read-more-link-does-not-displayed-when-there-is-no-excerpt/
-
Problems in translation with plugin Polylanghttps://wordpress.org/support/topic/problems-in-translation-with-plugin-polylang/
-
Title on website on one row, not twohttps://wordpress.org/support/topic/title-on-website-on-one-row-not-two/
-
How to Make Post Titles Link to External Siteshttps://wordpress.org/support/topic/how-to-make-post-titles-link-to-external-sites/
-
[Theme: Twenty Eleven] Entry title header questionhttps://wordpress.org/support/topic/theme-twenty-eleven-entry-title-header-question/
-
WP 2011 with qtranslate, How do I translate the headlinehttps://wordpress.org/support/topic/wp-2011-with-qtranslate-how-do-i-translate-the-headline/
-
multilingual issuehttps://wordpress.org/support/topic/multilingual-issue-1/
-
site title line lengthhttps://wordpress.org/support/topic/site-title-line-length-1/
-
Excerpt on home page instead of full content – how do I change it?https://wordpress.org/support/topic/excerpt-on-home-page-instead-of-full-content-how-do-i-change-it/
-
Removing site title and description?https://wordpress.org/support/topic/removing-site-title-and-description/
-
[Theme: Twenty Eleven] Getting entry-meta *after* entry-title on single entry pageshttps://wordpress.org/support/topic/theme-twenty-eleven-getting-entry-meta-after-entry-title-on-single-entry-pages/
-
Remove link from page title.https://wordpress.org/support/topic/remove-link-from-page-title/
-
H1 Taghttps://wordpress.org/support/topic/h1-tag-2/
-
Can I Remove Title Header from Each Page?https://wordpress.org/support/topic/can-i-remove-title-header-from-each-page/
-
site title line lengthhttps://wordpress.org/support/topic/site-title-line-length/
-
Help with two different h1 and title tags in 2011 theme pleasehttps://wordpress.org/support/topic/help-with-two-different-h1-and-title-tags-in-2011-theme-please/
-
[Theme: Twenty Eleven] I want page/post title links under the search box (see pics)https://wordpress.org/support/topic/theme-twenty-eleven-i-want-pagepost-title-links-under-the-search-box-see-pics/
-
[Theme: Twenty Eleven] Changing position of author on single.php and query regarding headingshttps://wordpress.org/support/topic/theme-twenty-eleven-changing-position-of-author-on-singlephp-and-query-regarding-headings/
-
No embeds in search resulthttps://wordpress.org/support/topic/no-embeds-in-search-result/
-
Post titles not showinghttps://wordpress.org/support/topic/post-titles-not-showing-1/
-
How to show author at top of posthttps://wordpress.org/support/topic/how-to-show-author-at-top-of-post/
-
Accessibility – Twenty Eleven themhttps://wordpress.org/support/topic/accessibility-twenty-eleven-them/
-
Adding custom Taxonomy to post metahttps://wordpress.org/support/topic/adding-custom-taxonomy-to-post-meta-2/
-
change "This entry was posted" and hide all titles from pagehttps://wordpress.org/support/topic/change-this-entry-was-posted-and-hide-all-titles-from-page/
-
[Theme: Twenty Eleven] Changing title on main pagehttps://wordpress.org/support/topic/theme-twenty-eleven-changing-title-on-main-page/
-
Changing "Read More" and date on category blog posts pagehttps://wordpress.org/support/topic/changing-read-more-and-date-on-category-blog-posts-page/
-
Word divisionhttps://wordpress.org/support/topic/word-division/
-
[Theme: Twenty Eleven] Link posts have no titlehttps://wordpress.org/support/topic/theme-twenty-eleven-link-posts/
-
Twenty Eleven for X-Cart Problem in Website Titlehttps://wordpress.org/support/topic/twenty-eleven-for-x-cart-problem-in-website-title/
-
[Theme: Twenty Eleven] Remove Title Header from Each Pagehttps://wordpress.org/support/topic/theme-twenty-eleven-remove-title-header-from-each-page/
-
[Theme: Twenty Eleven] Double H1 tags used in templatehttps://wordpress.org/support/topic/theme-twenty-eleven-double-h1-tags-used-in-template/
-
[Theme: Twenty Eleven] Post Title Too Largehttps://wordpress.org/support/topic/theme-twenty-eleven-post-title-too-large/
-
[Theme: Twenty Eleven]https://wordpress.org/support/topic/theme-twenty-eleven-2/
-
Change order or “Older Posts” & “Newer Posts”https://wordpress.org/support/topic/change-order-or-older-posts-newer-posts/
-
Change display to RTL (right to left)https://wordpress.org/support/topic/change-display-to-rtl-right-to-left/
-
[Theme: Twenty Eleven] Manual excerpts, facebook, and a child themehttps://wordpress.org/support/topic/theme-twenty-eleven-manual-excerpts-facebook-and-a-child-theme/
-
Want news posts to show title instead of first 20 words of contenthttps://wordpress.org/support/topic/want-news-posts-to-show-title-instead-of-first-20-words-of-content/
-
Help with Twenty Eleven Theme Pleasehttps://wordpress.org/support/topic/help-with-twenty-eleven-theme-please/
-
site title, tagline & blog sizehttps://wordpress.org/support/topic/site-title-tagline-blog-size/
-
Hiding a part of long postshttps://wordpress.org/support/topic/hiding-a-part-of-long-posts/
-
Alignmenthttps://wordpress.org/support/topic/alignment-26/
-
Unable to reduce title tag – combining paghe and post titlehttps://wordpress.org/support/topic/unable-to-reduce-title-tag-combining-paghe-and-post-title/