How to Add Google AdSense Ad Under Navigation Menu in WordPress

Google Adsense can generate huge revenue if you can use it wisely. One of the best way to increase revenue is placing ads on different  places of your website. After few research we found that Ads under Navigation Menu works GREAT. Its CTR is high.

You can use different Ads like Leaderboard (728 x 90) or (728×15) Displays 4 links. For me, Link Unit generates more click, though earning isn’t so high.

So in this post I’ll show you how to add Adsense ad under nav menu in WordPress.

How to Add Google Adsense Ads Under Navigation Menu

If you are going to use Link Unit then I suggest you to make it look like navigation bar. Change the background and text link color according to your navigation menu just like this:

Add Adsense in Thesis

For Leaderboard, use Image/rich media ads only.

Now follow the simple steps.

1. At first, Login your Adsense Account and create you desire ad unit. Copy the code.

2. After copying the code, login to WordPress dashboard. Go to Editor and Find Header.php file on the editor.

3. Open the header.php file and paste the Adsense codes at the bottom of the file.

4. To make it center just use the center tags like <center>Google Adsense Code</center>.

That’s it you’re DONE. 

If you’re using Thesis 1.8 then just follow the bellow steps.

1. At first take a back up of your custom_functions.php and Custom.css file which are to be used in this steps. In case of any mistake you can back up will help you.
2. Now put the following code in your custom_functions.php file.

function addmenu() { ?>
<ul id=”addmenu”>
<?php }

Click on save button.

3. Then put the following code on your Custom.css file.

.custom ul#addmenu {
height: 20px;
background:#E6E6E6 none repeat scroll 0 0;
padding-top: 5px;
width: 100%;

Click on save button and you are done.

Also Read: How to manage your Ads in every post with ‘Post Layout’ Plugin

Hope this post helps you to put Adsense Ads under nav menu. Do let us know if you face any difficulty via comments. If you find this useful consider sharing with your friends.

  • hardy says:

    Hey..I just figured this..Can you help me how to align the add more towards left rather than the center ?

    • Istiak Rayhan says:

      put your ad code between HTML ‘left’ tag.

  • hardy says:

    Thnx for the suggestion Istiak…
    Can you please tell me how did you place the 728×90 banner at the header..?
    I am sorry for the nooby questions..m actually new to adsense and very curious..
    Whats better than taking an advice from a pro.. :-)

    • Istiak Rayhan says:

      It's ok mate. I am always there when people need me. :)
      It's pretty simple. on your custom_functions.php file add this (Backup your file before editing them.) :

      function header_banner() { ?>
      <div id="header_banner">
      *Your adsense code*
      <?php }
      add_action('thesis_hook_header', 'header_banner');

      Then add this on custom.css file :

      /*Adding HEADER ADSENSE */
      .custom #header_banner { float:left; position:absolute; width:728px; height:90px; top:17px;
      margin-left: 12em; }

      That's it. You are done.

  • reuma says:

    Hi, i feel that i noticed you visited my weblog thus i got here to return the want?
    .I am trying to in finding things to improve my site!I guess its good
    enough to make use of some of your concepts!!

  • krystle says:

    Just tried to do this and now my site won’t even load it says Parse error: syntax error, unexpected T_STRING in /hermes/bosweb/web107/b1076/ipg.bakingbeautynet/wp-content/themes/prose/functions.php on line 77

    any advice? :(

    • Istiak Rayhan says:

      These codes are for Thesis theme. I think you dont use Thesis.
      Delete the code you added on your functions.php file. Your site will load like it used to be. Thanks. Keep in touch.

  • vinay says:

    Hello Istiak,
    Can you show how to add this in wordpress blog?

  • Dickson says:

    Thanks for the sharing of the method to place the adsense code. How about the blogger platform? Please advise.

  • Dinaviriya says:

    Thank you very much for the nice sharing. Will try it to increase my adsense revenue.

  • Christie says:

    I have this on a niche site – and then when I upgraded to Thesis 2 I can’t see where the code is because we no longer have the same files to edit (and I haven’t learned about skins and packages yet). Is there an easy way to remove this or at least find it if I want to remove it? Thanks!

  • hey,

    Is there any plugin which can do this ? I am new to wordpress and just don’t to mess up anything.

    • Istiak Rayhan says:

      Unfortunately there is no plugin to do that.

      • Jon McClure says:

        there has to be a plug or theme that can add code to the header. If not, someone really should make one.

  • Muminur says:

    Can you tell me about another themes. I don’t use thesis theme. Check my site and suggest me please , how can I put it on my site. Tnx in advance bhai.

    • Istiak Rayhan says:

      Hey Muminur,
      You are using a premium theme from themeforest. Just ask the theme Author. He will help you with this. Thank you for stopping by.

  • How to put same in genesis 1.8.2???

    • Istiak Rayhan says:

      I have no idea how to do it on Genesis. But you can get it from Genesis Support.

  • Angelina says:

    Thanks for the great tutorial! It always bothered me so much that I couldn’t center my leaderboard ad! But now I have a different problem, and that is that I have way too much space between the menu under the header and the links ad. Is there any way I can get rid of all that white space?
    Also, how can I attach the links to the menu like you suggested?
    Thank you very much!

    • Istiak Rayhan says:

      I am sorry to say that I’ve no idea about how to fix it.

  • pradeep says:

    the post is really cool and awesome..
    it helps me….

  • Taswir Haider says:

    Good guide Rayhan. This is a perfect place to add link units under navigation menu. I also tried them once but later stopped as link units need to be clicked 2 times to get any revenue.
    Still link units blend nicely with the navigation menu, so I really love the placement.

  • Jeannette says:

    Most useful tutorial sir. I already use it and find it’s work, before this don’t have any idea to adjust my ads position

  • shivani says:

    this doesnt work for me! I tried like 4 times. Do you know what could be wrong?

  • shivani says:

    I have thesis 1.8 and i pasted both of the codes in the file and waited for more than 24 hours.. nothing happened. Dp i have to remove the * in the first code?

    • Istiak Rayhan says:

      Hey Shivani,
      Yes you need to remove that * from the code. Just Put your adsense Code there. Without the *.
      Hope this helps.

  • Tit says:

    I will do it for my blog.thanks for sharing the tips.

    • Istiak Rayhan says:

      Unfortunately this post is for WordPress Blog, not for Blogspot blog.

  • Amit says:

    HI i try this but it show ad on home page also. how to only show ad when post is open ?

    • Istiak Rayhan says:

      I am afraid I don’t have any idea ‘how to do it’.

  • Bel says:

    Hello there, I use fashionista theme from for my blog. How can I add adsense under my main menu navigation? You mentioned that this is only for thesis theme? I would appreciate if you could help me. Thanks.

    • Istiak Rayhan says:

      This tutorial has two parts. First part is applicable for all WordPress Theme and second part is for only Thesis 1.8. Hope you got your answer.

  • Neetu says:

    Hi Istiak,
    The above article is really useful and I want to use it myself, but since I am new to thesis I have a doubt.
    1) I cannot find custom.css and custom_functions.php under my wp-contentthemesthesis folder. Having said that there should have been a ‘custom’ folder as well right?
    2) Or is it that these two files get created only when i actually start customizing? I thought they should be available by default.

    Can you please help me I’m unable to get any answers


    • Istiak Rayhan says:

      I’ve just checked your site. You are using Thesis 2. This tutorial is for Thesis 1.x.

      For Thesis 2, you can do it using drag and drop page builder.

  • Goalshunter says:

    thanks buddy it worked for me….

  • tuttysan says:

    Worked great on my site. Thank you.

  • Madiha says:

    its not working on my site plz visit and tell the solution

  • avi says:

    Hi i have the splash theme by mythemeshop do you know how i can how this type of adsense code like the 728 by 15 under the header?

    thank you

    • Istiak Rayhan says:

      Just ask on MyThemeShop support forum.

  • Natia says:

    Awesome! Simple and straight to the point. Thanks for your help!

  • Avinash Kumar says:

    Thanx for such great post. I have installed ads just below header on my blog. :)

    • Istiak Rayhan says:

      Avinash, Glad to know that you find it useful.

  • ertu says:

    not working

  • Adesanmi Adedotun says:

    I’m not not an expert in coding and I don’t want to mess everything up, is there a way I can have this done using plugin?

  • Hi, I am using genesis theme, now adsese plugin is going to removed by google soon. How can I place ad below menu bar manaully. Is it the same process explained by you or there is something different.

  • Thanx for this Article. it Really helped me to place ads on header section.


  • Baldwin Jackson says:

    Great effort mate, No doubt there are several different position where you can place ads like header, side bar, under navigation and has different CTA. Generally bloggers love to enjoy the fruits of their visitors but on average what would you consider a good CTA? Anyway thanks for sharing.