How to get rid of the blog title and description in the WordPress header
Thanks for you very helpful tips and informative answers to questions. I am in the very early stages of building my WordPress blog and with your help I was successful in replacing the default header with my own. The problem I now face is that my new header contains my blog title, so I want to hide the default blog title and tag line from display. (they now overlap) Is there a “coding” way to do that other than blanking them out in my general settings?
Your advice would be most helpful
Thank you
Warren
Warren, I’m delighted to help. What is happening is that the blog title and tagline (also known as the description) are still part of your header.php file.
Step 1: Make a Back-up Copy of Your header.php File
Load the header.php file from your selected theme in the HTML editor of your choice (remember, never use MS Word or other Microsoft text editor except Wordpad). Now do as “save as” and give the file a new name like “header-backup.php”.
This is could policy whenever you are changing code in a critical file.
Step 2: Find the Blog Title and Description Code in Your header.php File
Once again, load the header.php file from your selected theme in the HTML editor of your choice.
Find the code that includes the terms “bloginfo(‘name’) and bloginfo(‘description’).
In the default WordPress template it looks like this:
<h1><a href=”<?php echo get_option(‘home’); ?>/”><?php bloginfo(‘name’); ?></a></h1>
<div><?php bloginfo(‘description’); ?></div>
“bloginfo(‘name’)” is the WordPress variable that writes whatever you put as your blog title in your General Settings. “bloginfo(‘description’)” is the WordPress variable that writes whatever you put as your tagline in your General Settings. The HTML code that contains those two variables is what is writing your blog title and tagline in your header.
They’ve got to go.
Step 3: Remove Blog Title and Description Code in Your header.php File
Now you have two options.
Option 1: delete the code. Yep, just highlight and delete the lines containing the bloginfo(‘name’) and bloginfo(‘description’).
Option 2:comment the code out. “Commenting out” means adding some characters that tells the browser to ignore everything between the specific tags. In HTML, the starting tag is <!- - and the ending tag is – ->. Below is how the default theme header.php would look if you commented out the blog title and tagline code.
<!-- This is the tag that starts commenting out the rest of the code
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div><?php bloginfo('description'); ?></div>
And this is the tag that ends the commenting out -->
Once you've eliminated the lines of code that include your bloginfo from your header.php, you problem should be solved.
And thanks again, Warren, for reading the site and asking the question.
6 Responses to How to get rid of the blog title and description in the WordPress header
Leave a Reply Cancel reply
Get a FREE 34-Page Guide
Avoid wasting money & hours. Over 50 free & low cost marketing resources are included.
Simply request below & I'll email you the code to download your free copy today! No Spam — Promise.
Recommended Resources
Domain & Hosting Services
How To Choose A Hosting Service
Dotster.com:
My Domain Name Manager for Over 10 Years
Westhost: Unlimited Databases, CPanel Control & Live Chat Support
Dreamhost: Green Hosting, Video Streaming & Extensive Support
Bluehost: Fast Backbone Connection, Unlimited Storage & Streaming Video
Squarespace:
Create a Professional Looking Website in Minutes (A Custom CMS Service)
Wordpress Themes
Pagelines Drag and Drop Web Design for WordPress:
Extensive Video Tutorials & Support Forum
Elegant Themes: Dozens of Beautiful Themes with Advanced Features for One Low Price
StudioPress: Flexibel Framework With Numerous Child Themes
Thesis Theme for WordPress: Options Galore and a Helpful Support Community
Woo Themes: Dozens of Easy-To-Use Professional Theme Designs







Hello. I was thrilled to see this advice. I tried it. Nothing changed. I also see the following code and wonder if that needs to be altered.
<!-- Begin navigation -->
<a href="/">Welcome</a&g
<!--End navigation -->
Thanks.Val
this really helped me out!! thanks for the well written explanation!
Unfortunately, this did nothing for me either. Check it out with the theme anonymous elegance. I tried altering the css as well. No luck! Thanks anyways, hopefully this works with other themes.
Sara, Thanks for bringing this lovely theme to my attention. I’ll definitely add it to my list to recommend.
This theme, however, will require either editing the stylesheet or using a small trick in the header.php code because it requires the HTML styling of the header H1 and .description class to properly align the background graphic. The easiest way is to trick the header.php file. Here’s how.
In the your theme header.php file, find the area that looks like this:
<div class=”header”>
<div class=”subscribe”><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php _e(‘Add this blog to any reader’); ?>”><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/rss.gif” alt=”RSS” /></a></div>
<h1> <!–<a href=”<?php bloginfo(‘url’); ?>”><?php bloginfo(‘name’); ?></a> –></h1>
<div class=”description”> <!–<?php bloginfo(‘description’); ?>–></div>
You now what to eliminate the code that inputs the bloginfo(‘name’) and bloginfo(‘description’) and replace it with the HMTL code for a non-breaking space which is .
The code you want to change looks like this:
<h1> <a href=”<?php bloginfo(‘url’); ?>”><?php bloginfo(‘name’); ?></a> </h1>
<div class=”description”> <?php bloginfo(‘description’); ?></div>
So the short, permanent solution will look like this:
<h1> </h1>
<div class=”description”> </div>
OR you can just comment out the php code incase you want to use it later, by doing this:
<h1> <!–<a href=”<?php bloginfo(‘url’); ?>”> <?php bloginfo(‘name’); ?></a> –> </h1>
<div class=”description”> <!–<?php bloginfo(‘description’); ?>–> </div>
I hope that clears things up for you. And thanks for stopping by.
Wow, I just landed on this page while searching for how to solve the same problem.
I dont want to delete my blog title and tagline, for SEO ourposes, but I want to hide both from view. I am using the “Thrilling Theme based on the Woo Fresh Themes”.
I am not sure whether any, and which of the above pointers tou gave (or a new one) would help me, as I want to be sure before doing.
Stella,
Sorry to break it to you, but you really can’t “fake” the title and description for SEO purposes. If you are using a header image or an image in the header, you can use the blog title and description in the alt attribute of the image tag. (Google HTML Image tag for more details on the alt attribute). But Google long ago started penalizing attempts to hide SEO text from site visitors while feeding it to their algorithm. This means things like trying to make the text the same color as the background color doesn’t work; it can actually hurt your SEO. Although, I know someone who successfully made the blog title and description the same color as the background image (the background image was white and the text were white), however, she had to carefully position and size the blog title and description so it did not land over top of the logo and other portions of the header background image she wanted seen.
I hope this helps. Good-luck!