Make WordPress Custom Header Image A Link

Changing the image is a pretty easy. Simply upload a different header to the themes Images folder, Change the name of the old header image to something else and then change the new header image to the name of the current header image.

Well it sounds simple enough huh? Well not so fast. There a few things to consider, like the size of the new image. Make sure it fits and looks well proportioned on your . But all that will be for another post. This is kind of backwards but after you change your header image it will usually cover the name of your blog that is linked to main blog’s URL and now there is now way for your visitors to click it to get back to the main blog page.

The fix is quite simple on the default theme. Open the themes header.php file. and look for the following code near the bottom.

<div id=”page”>

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

Now add the following code between the page and header id and change the red URL to your blogs URL.

<div class=”header” onclick=”location.href=’http://www.Your Blogs URL Here.com‘;”
style=”cursor: pointer;”></div>

The code should look like this:

<div id=”page”>
<div class=”header” onclick=”location.href=’http://www.Your Blogs URL Here.com’;”
style=”cursor: pointer;”></div>
<div id=”header”>
<div id=”headerimg”>
<h1><a href=”<?php echo get_option(’home’); ?>/”><?php bloginfo(’name’); ?></a></h1>

Now your whole WordPress header image will be linked to your main blog’s URL or the blog’s home page.

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

6 comments so far

How To Add A Google Sitemap To A WordPress Blog

A few simple steps and a great WordPress plugin that will automatically build a sitemap for your blog and notify Google of all your new posts. This is one of the more important steps involved when setting up your new WordPress blog if you want organic search engine traffic.

Read this article ->

My WordPress Blog is Broken and I Don’t Know What to Do

You made a recent WordPress blog post, or customized your WordPress blogs theme and now it looks terrible. Here are a few things to look for and consider when creating a new WordPress blog post or customizing WordPress to eliminate any problems.

Read this article ->

Fix WordPress Sidebar Widgets That Don’t Work

You may have come across a cool WordPress theme that you really want to use on your WordPress blog but it might need just a bit of tweaking to make it standout or, in some cases work correctly. In this example what to do if your new themes widgets aren’t working.

Read this article ->

WordPress Version 2.3 Coming Soon

WordPress continues to improve and evolve. As some continue to Customize WordPress with plugins, some of the more popular are getting bundled into WordPress.

Read this article ->

Add Background Color To Single Page Sidebar On Default WordPress Theme

Adding the sidebar to the WordPress default theme is really pretty easy but you may have missed one more step to have the single post page show the background in the sidebar. The WordPress default theme was written to not show the sidebar on the single post page. Because of that it specifies one background image for the main index that shows the gray background in the sidebar. And another image for the single post page with no background in the sidebar area. The version of the default theme you have determines what image background to use. But don’t worry you will see what image to use right in the header.php file.

Read this article ->

Adding MyBlogLog Widget To A WordPress Blog

You probably have seen the MyBlogLog widget on a few WordPress blogs. It has pictures of the latest visitors of the blog shown on the sidebar. What is MyBlogLog? Taken from the MyBlogLog About page: “MyBlogLog enables you to take advantage of your existing presence on the Web and ties it into communities of like-minded readers and authors to add context to the conversations in which you take part.”

Read this article ->

Change WordPress Default Theme Header Colors

The default WordPress theme is probably the most popular and base of many other themes that have been created after it. Changing the color of the default themes header is a way to keep a simple uncluttered look yet making it stand out and look different.

Read this article ->

« Previous PageNext Page »

Close
E-mail It