How to add adsense ads to header of thesis wordpress theme

We have previously posted about How to add twitter,Digg,Facebook share buttons to wordpress thesis theme in Thesis Customization Tutorials.

Adding a banner ad near your header logo to the right of the header can get you more clicks.Here is a short tutorial on How to add adsense ads in header of thesis theme.

Add Adsense to right of thesis  Header:


1.Open  Custom_functions.php in your custom folder

2.Copy this php code and paste it into your Custom_functions.php file

function header_banner() { ?>
<div id="header_banner">
[INSERT ADD Google Adsense Ads CODE HERE to place in thesis theme]
<?php }
add_action('thesis_hook_header', 'header_banner');

3.Then add the below css code to the custom.css file

.custom #header_banner { float:right; position:absolute; width:468px; height:60px; top:100px;
margin-left: 45.5em; }

Note:If your header banner ad appears messy,try adjusting the Top pixels[for my site i have change to top:152px]

Great!You have successfully added adsense banner ad to the header of thesis wordpress theme

Do also read :

How to add Author’s profile box at end of posts in Thesis Theme

How to add comments(opinions) and Read more link in Thesis homepage(Teaser box)

You can take a look at all our Thesis Customization Tutorials here

Did you like this tutorial.Don’t forget to share your opinion with us :-)Do tweet and share..

4 comments… add one
  • sai@dailyblogtools Oct 29, 2011 @ 21:08

    thanks for the step by step tutorial gowtham

  • Rasel Rony Nov 4, 2011 @ 13:33

    Its the best way to get click on adsense ads when it appears on your site header, thanks nice post

  • Amandeep singh nagpal Nov 12, 2011 @ 21:06

    Yeah ,, it helps in generating revenue since header is the place which gets clicked most of the time .. 🙂

  • NIAZ Jan 16, 2012 @ 11:16

    Very very nice information for WordPress website developers.

Leave a Reply

Your email address will not be published. Required fields are marked *