Change WordPress Header Font Size And Color

Changing the font in the header of WordPress blog theme can be done if you know what files to edit. However the code to edit can (and will) vary in all themes. This WordPress guide will help you figure out what code your header is using to call for the blog name and description and how to edit it.

The first step is to make your WordPress theme’s files writable. To do that you must change the permissions in your hosting account. I suggest connecting to your hosting account with an FTP client, and browse to the theme and change the permissions on the whole theme’s folder and all the files within it to 777. Otherwise you may need to change one file at a time if doing so in the control panel of the hosting account. The path to the theme is the blogs directory then wp-content/themes/your-theme. You could just make the whole themes folder writable.

From within the WordPress dashboard, click Presentation or Design, then Theme Editor. Almost all theme editing is done in the stylesheet (style.css) file, and all other files are just displaying the settings that are specified within the stylesheet. There are exceptions to this but beyond the scope of this WordPress guide.

WAIT!!! Before doing any editing copy the contents of the file and paste it into a text file like Notepad for safe keeping before you attempt to edit it. If you screw things up you can paste the original back in to restore your file. Remember this is extremely important and I take no responsibility for what you may do to your WordPress blog!

On the right side of the Theme Editor are all the files associated with your active theme. Finding the correct code to edit to change the font of the header is in the header.php file. While you don’t need to edit this file the clues to what the header is calling for from the themes stylesheet can be found in the header.php file. Below is the code from the header file found in the default theme.

<div id=”header”>

<div id=”headerimg”>
<h1><a href=”<?php echo get_option(’home’); ?>/”><?php bloginfo(’name’); ?></a></h1>
<div class=”description”><?php bloginfo(’description’); ?></div>

The code between the <h1> tags is the clue we are looking for that calls up the name of the blog. The blog name in the header is styled by the <h1> tags, and the description is being called from the <div class=”description”>. Now that we know what is styling these two items we can edit the style.css file to change the way these two items are displayed. Remember that this case is specific to the WordPress default theme and you need to look at your specific themes header file to determine what code you need to work with. In most cases the <h1> tags call up the blog name but the description or Tagline can be called almost anything.

Now click the themes style.css file on the right side of the Theme Editor and look for the code from the header file. In this case it is

h1 {
font-size: 4em;
text-align: center;
}

#headerimg .description {
font-size: 1.2em;
text-align: center;
}

If you want to change the color additional styles can be added like this:

#headerimg .description {
font-size: 1.2em;
text-align: center;
color: #666666;

}

The h1 code and description can now be changed to a larger size or aligned differently, it can be aligned to the left, right or kept centered. The font color can also be changed by adding this code color: #666666; and changing the color code number to your liking. Make your changes and click Update File, then look at your blog to admire your work. You may need to refresh your browser to see any changes. There are numerous css styles that can be applied to the text in a stylesheet, far to many to place in this post. For css color codes check out CSS Color Chart or Google css color codes. For more styles that can be applied, a quick Google search for css font styles, can keep you busy experimenting for hours.
Thanks to Stephen from The Lazy Way To Buy And Sell Cars blog who asked for this guide and a million other questions on Ask Max

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

No comments yet

How To Upload Plugins WordPress Guide

Some of the most common tasks for those of us who do it every day can be quite frustrating for others trying it for the first time. Uploading WordPress plugins can be one of those things that newbies find frustrating. I have had people ask here on the site and I see it in forums quite often. Someone will upload a plugin but it doesn’t show up in the dashboard. This WordPress Guide will walk you through the process of uploading a WordPress plugin and how to know when to upload the whole folder or a singe file.

Read this article ->

WordPress To Run Your Website

Too often I get contacted by people who just spent a lot of either time and money to get a static HTML website setup who then want a WordPress blog theme to match their nice new website. Or those that want to start a website and then add a blog that will match. My question is always why? Why bother with both when WordPress can do it all?

Read this article ->

WordPress 2.5.1 Released Security Issues And Other Fixes

WordPress 2.5.1 is already been released and is out now. It has an important security fix that is not been exposed yet but it it will most likely be found soon enough.

Read this article ->

WordPress 2.5 Dashboard Changes

WordPress version 2.5 comes with some major changes in the look and navigation of the dashboard. While everything, and more, is still in the dashboard some things have be renamed and getting to them is a little different now.

Read this article ->

Choose WordPress Pages Displayed In Navigation Bar

If your blog has a navigation bar in or near the header chances and you create a lot of pages on your WordPress blog chances are it is getting somewhat cluttered. You can control what pages are displayed by including the ones you want or excluding a certain few. Here is a short WordPress guide to help you clean things up.

Read this article ->

Tagging A WordPress Post Mutiple Tagging Plugins

After testing several WordPress tagging plugins I have found not one but three tagging plugins that work well together on WordPress Version 2.3.x. Having three tagging plugins may seem like overkill but hey the more the merrier right? This WordPress guide gives you three different tagging options, you can choose to use one or all of them together.

Read this article ->

Maximize WordPress Authority Black Book 2.0

The book that generated so much buzz in the blogging community in 2007 has been updated for 2008. This free ebook has shown thousands of bloggers how to create authority WordPress blogs and generate free traffic using all the tools only WordPress provides.

Read this article ->

Next Page »

Close
E-mail It