≡ Menu

Display Adsense Ads Below Nav Bar in TechMaish WordPress Theme

Displaying adsense ads below navigation bar in TechMaish Theme or any other wordpress theme is very simple. You need to edit 2 files, No.1 Header.php and Style.css and add a code to accomplish it.

As a example just look at to the screen shot, so that you can know that how the adsense 728×15 link unit will look on TechMaish theme.

Previous article: Insert Adsense inside Post

techmaish nav bar ads

How to Display Adsense Ad Below Nav Bar?

1st Step

1. Go to Dashboard>Appearance>Editor

2. Click on Header.php file and scroll down to the bottom of the code.

Paste the below code in the middle of “<div><!–end of #header–>” and <div id=”main”> code. Copy this code but make sure to replace the adsense code with your own adsense code.

Don’t copy the Red portion, copy only the blue portion and replace the adsense code with your own code.

</div> <!– end of #header –>
<div id=”adsenseads”>
<script type=”text/javascript”><!–
google_ad_client = “pub-xxxxxxxxxxxxx”;
/* 728×15, created 6/21/10 */
google_ad_slot = “xxxxxxxxx”;
google_ad_width = 728;
google_ad_height = 15;
//–>
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>

</div>

<div id=”main”>

Save the file.

2nd Step

Now Open style.css file and paste the below code at the bottom of the page.

#adsenseads {
background:none repeat scroll 0 0 #555555;
height:20px;
margin:0 auto;
padding:5px 0 0 0;
width:968px;
}

Save the file and visit your blog, you will see the 728×15 link unit added just below the Nav Bar.

If you have any question about TechMaish theme, or need any feature then feel free to post in comment. Soon i will be launching another version of TechMaish Theme, where lots of features will be added. So keep visiting for the next update or Subscribe to our RSS Feed to get updates in mail box.