Customizing “Prosumer 1.4″ made by Nurudin Jauhari: Adding a Google adsense leader board.
I found this very nice Wordpress Template created by Nurudin Jauhari. The Wordpress template name is Prosumer 1.4. It’s neat, compatible with WP 2.5, but I want to add more.:) I want to put adsense to it, a list of new post, pages and archives at the bottom and eventually a media player inside it.
So I just want to share some additions that I made to the template.
I. Google Adsense container under the Header. (please see image below, click to see larger image)
Challenge: I want to put a Google Adsense container under the header. It’s more of a leader-board style. ![]()
So here’s how I did it. (you can follow the steps provided that you already installed prosumer 1.4 in your “themes editor” in WP.
1. Open header.php using any text editor (I used Dreamweaver CS3 for it’s WYSWYG feature) or open Header.php in the Theme Editor in WP and look for this code.
</div>
</div>
<div id=”topy”>
<div id=”menuv”>
<ul>
<li <?php if(is_home()){echo ‘class=”current_page_item”‘;} else { echo ‘class=”page_item”‘;}; ?>><a href=”<?php bloginfo(’siteurl’); ?>/” title=”Home”>Home</a></li>
<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=’); ?>
<?php wp_register(’<li class=”admintab”>’,'</li>’); ?>
</ul>
</div>
</div>
2. Add a new div tag with and id between these tags
..</div>
<div id=”test”></div> <— I added this. I used the name “test” as the ID for the div tag that I added.
<div id=”topy”>…
3. open style.css and add this at the bottom
#test {
width: 700px;
margin-right: auto;
margin-left: auto;
}
* it gives the div a total width of 700 px.both right and left margin is set to auto, it makes the div centered.
4. add your google adsense script inside the test div. (here’s an example of mine)
<div id=”test”> <script type=”text/javascript”><!– google_ad_client = “pub-4920514870622981″; /* 728×90, created 4/23/08 */ google_ad_slot = “0290996272″; google_ad_width = 728; google_ad_height = 90; google_color_border = “fffdf6″; google_color_bg = “fffdf6″; google_color_link = “802100″; google_color_text = “333333″; google_color_url = “802100″; google_ad_format = “728×90_as”; google_ad_type = “text”; //–> </script> <script type=”text/javascript” src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”></script> </div>
5. update the pages by uploading the header.php and styles.css back to your remote server or click on “update file” if you’re using the Theme Editor.
Now, you should be able to see the adsense just below your header. I used 728×90 for my leader board. Make sure that the script is complete to make t appear.
HTH!
sid
how bad do you want change?







April 27th, 2008 at 5:55 pm
Thanks Sid, this worked perfectly for me!
I also want to lengthen my image header across the length of the screen like you have. And to change the color of the yellow banner that is on the the Home and About Section. Unfortunately I have no idea how to do this, so I rely on the advise of good people like you to help me!
April 28th, 2008 at 6:04 am
Hi Nakul,
I’m glad that it worked for you. I’ll create a post on how to extend the header so the others can be benefited too. I’ll let you know once the post is up. Anyway, I’m planning to post all the modifications.
Cheers!
April 28th, 2008 at 7:08 am
[...] post is in response to Nakul’s question on how to extend the header according to the browser’s [...]