Finally had some time and the mood to do some WordPress Theme modding again. As promised earlier, I put the StudioPress Theme to task again, this time using the codes given to me by Darran of LimeTouch.

I must say here that this mod might be a little difficult for one that has entirely no knowledge of CSS as it involves modding the stylesheet and the header files in order to get a resonably good alignment for the header image. However if you are as adventurous as me and enjoy having your head knocked against the wall, please be my guest. Remember to keep an original copy of the theme after you have uploaded it to xammp so if you screw up so bad that you can’t remember what you did, you can always replace the corrupted file with the original one.

First thing you got to do is to make your image. To make things easier, make the image width not more than 500 px. The height is not an issue, so you can make it whatever you like. Title the image whatever you like and upload it to your theme’s image folder. Now open your stylesheet and scroll down until you see the #header code. Immediately after the division sign insert these codes.

#header {
background: url(images/header2.jpg);
float: left;
width: 310px;
height: 90px;
margin-top:0px;
}

Those are mine preference. Adjust the dimensions accordingly. Now when you reload your theme, you should see the image appearing on your header, but everything seems all jumbled up. The search box will be appearing inside your header image and the RSS Button will be pushed down below your header. All this has to do with the header file. The search box is located within the header wrapper in the header file so it appears inside the header image. To overcome that, we have to move the search box away from the header wrapper.

Open your header php and locate the codes for the search box. It should be directly below the codes <div id=”wrapper”>. Cut and paste the codes to the position immediately before the closing of the header codes. </head> Update and reload your theme. The search bar should now rest somewhere inside the blue column on the top. In my case, I just remove the search box entirely as I feel it is never used and if I do want a search box, I can always use the widgets available and place it in my sidebar.

Now comes the RSS image. Locate these codes in your header php.

<div class=”cleared”></div>
<div id=”underheader”>
<div id=”toprss”><a href=”feed:<?php bloginfo(’rss2_url’); ?>”>
<img src=”<?php bloginfo(’template_directory’); ?>/images/grabrss.gif” alt=”grab our rss feed”></img></a>
</div>

Cut the whole lot and paste them, also just before the closing of the header, </head>. Update and reload again. The RSS image should know be at the same level as your new header image. Now the whole header will look a lot better.

I faced some problems like the whole page content going out of alignment and that was because there was an extra closing division tag that I forgot to remove when I deleted the search box codes. The whole portion of the head codes should look something like this. (Without the Search Box)

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>

<head>
<meta name=”verify-v1″ content=”2t2I3SJ6iToU8/B62DxxdpwXzDqhB5VPZbArSs55ZJw=” />
<meta http-equiv=”Content-Type” content=”<?php bloginfo(’html_type’); ?>; charset=<?php bloginfo(’charset’); ?>” />
<title><?php if (is_home () ) { bloginfo(’name’); echo ” - “; bloginfo(’description’);
} else { wp_title(”,true); echo ” - “; bloginfo(’name’); }?></title>
<meta name=”robots” content=”index,follow” />
<meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” />
<link rel=”stylesheet” href=”<?php bloginfo(’stylesheet_url’); ?>” type=”text/css” media=”screen” />
<link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(’name’); ?> RSS Feed” href=”<?php bloginfo(’rss2_url’); ?>” />
<link rel=”pingback” href=”<?php bloginfo(’pingback_url’); ?>” />
<link rel=”icon” type=”image/x-ico” href=”<?php bloginfo(’template_url’); ?>/images/favicon.ico” />
<?php wp_head(); ?>
<div class=”cleared”></div>
<div id=”underheader”>
<div id=”toprss”><a href=”feed:<?php bloginfo(’rss2_url’); ?>”>
<img src=”<?php bloginfo(’template_directory’); ?>/images/grabrss.gif” alt=”grab our rss feed”></img></a>
</div>

</head>

<body>
<div id=”wrapper”>
<div id=”header”>
<h1 class=”sitename”><a href=”<?php echo get_option(’home’); ?>”><?php bloginfo(’name’); ?></a></h1>
<h2 class=”sitedesc”><?php bloginfo(’description’); ?></h2>
</div><!– Closes underHeader –>

So if something don’t seem right, compare and see if you an extra </div> somewhere. Bear in mind that what is written here is just for the StudioPress Theme. Other themes works differently. Take a look at my other blog, Online Entrepreneur, where I am using the theme. It should give you a rough idea of how it should look. I replaced the background and the RSS image as well.

Related

Inserting A New Header Image
Latest Adsense Optimized WordPress Theme
Simple Modifications For Your WordPress Theme
Latest Professional Looking WordPress Theme
A Dateless WordPress Theme For Niche Blogging
Blog Theme Standardization
The Importance Of A Blog’s Theme
K9 Theme For WordPress 2.5