How to Customize Titles and Fonts in the Twenty Fourteen Theme
Content
Customizing the appearance of your site is a common need, and one of the most frequent requests for the Twenty Fourteen theme involves changing titles and fonts. Whether you're looking to adjust the font size, change the font family, modify the title's background color, or address SEO concerns with heading tags, this guide covers the most effective methods.
Why These Customizations Are Necessary
The Twenty Fourteen theme has a specific design and structure. Its styles are defined in its main style.css file, and its page titles are often generated from template files like content.php. The theme does not include built-in options in the WordPress Customizer for every typographical change, which is why manual customization through code is typically required. It's also important to note that some page templates, like the full-width template, have unique CSS classes that must be targeted specifically.
The Golden Rule: Use a Child Theme or Custom CSS Plugin
Important: You should never edit the core Twenty Fourteen theme files directly. As the default WordPress theme, having an unmodified original is crucial for troubleshooting and future updates. Always make changes in a child theme or by using a Custom CSS plugin.
Common Customizations and Their Solutions
1. Changing Font Family, Size, and Weight
To change the font for post titles site-wide, use the following CSS. The .entry-title class controls most post and page titles.
.entry-title {
font-family: "Times New Roman", serif !important;
font-size: 33px !important;
font-weight: 700 !important;
}
2. Changing the Page Title Background Color
If you need to change the background color behind page titles, target the entry header.
.site-content .entry-header {
background: #000000; /* Your color here */
}
3. Centering Titles on Specific Page Templates
Your CSS might only work on full-width pages because the selector includes .page-template. To target titles on all pages, use a more general selector.
h1.entry-title {
text-align: center;
color: blue;
}
4. Addressing SEO and Heading Structure (H1 vs. H2)
Some users wish to change the site title from an H1 to an H2 tag for better SEO practices. This requires modifying theme template files in a child theme. Locate the header.php file in your child theme and find the line with <h1 class="site-title">. Change the h1 tags to h2.
5. Adding a Logo in Place of the Site Title
Replacing the text-based site title with a logo is a popular request. This is best achieved by creating a child theme and adding a logo upload feature to its functions.php file or by using a dedicated plugin. CSS-based image replacement is another method but is less flexible for managing the logo.
Conclusion
Most visual changes to titles and fonts in the Twenty Fourteen theme can be accomplished with targeted CSS added to a child theme or a Custom CSS plugin. For more structural changes, like modifying HTML tags, creating a child theme is essential. Always remember to clear your cache after making changes to see the results.
Related Support Threads Support
-
How change font name and/or size on all pages?https://wordpress.org/support/topic/how-change-font-name-and-or-size-on-all-pages/
-
Accessibility feedbackhttps://wordpress.org/support/topic/accessibility-feedback-2/
-
Twenty Fourteen "Blog" Page Titlehttps://wordpress.org/support/topic/twenty-fourteen-blog-page-title/
-
Where is post title generated?https://wordpress.org/support/topic/where-is-post-title-generated/
-
Overwriting static front pagehttps://wordpress.org/support/topic/overwriting-static-front-page/
-
Can Twenty Fourteen Support a Graphic Logo?https://wordpress.org/support/topic/can-twenty-fourteen-support-a-graphic-logo/
-
Change Page Title Background Colorhttps://wordpress.org/support/topic/change-page-title-background-color/
-
How do i get the page headers as h1 text?https://wordpress.org/support/topic/how-do-i-get-the-page-headers-as-h1-text/
-
ull overview of templates and elements?https://wordpress.org/support/topic/ull-overview-of-templates-and-elements/
-
Bold Font for Title ?https://wordpress.org/support/topic/bold-font-for-title/
-
Twenty Fourteen – Modify the look of page titleshttps://wordpress.org/support/topic/twenty-fourteen-modify-the-look-of-page-titles/
-
CSS..I just want to change font-family on Post Titles. Can anyone help?https://wordpress.org/support/topic/cssi-just-want-to-change-font-family-on-post-titles-can-anyone-help/
-
Make Site Title into H2 Headinghttps://wordpress.org/support/topic/make-site-title-into-h2-heading/
-
Entry title won't stay lefthttps://wordpress.org/support/topic/entry-title-wont-stay-left/
-
Problem With OL Typeshttps://wordpress.org/support/topic/problem-with-ol-types/
-
[Theme: Fourteen] Website title and site description in the same linehttps://wordpress.org/support/topic/theme-fourteen-website-title-and-site-description-in-the-same-line/
-
how to set password protected page for twentyfourteenhttps://wordpress.org/support/topic/how-to-set-password-protected-page-for-twentyfourteen/
-
Word wrap texthttps://wordpress.org/support/topic/word-wrap-text/
-
Resize and change text in ‘personalisation’ boxhttps://wordpress.org/support/topic/resize-and-change-text-in-personalisation-box/
-
Help me to replace published date with updated datehttps://wordpress.org/support/topic/help-me-to-replace-published-date-with-updated-date/
-
Customization of site titlehttps://wordpress.org/support/topic/customization-of-site-title/
-
TwentyFourteen – Add Call to Action Button in the Center of Screenhttps://wordpress.org/support/topic/twentyfourteen-add-call-to-action-button-in-the-center-of-screen/