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”>
*PLACE ADSENSE AD HERE
</ul>
<?php }
add_action(‘thesis_hook_before_content_box’,’addmenu’);

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.

Comments

  1. 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.

  2. 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*
      </div>
      <?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.

  3. 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!!

  4. 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.

  5. vinay says

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

  6. says

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

  7. says

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

  8. 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!

  9. says

    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.

  10. 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.

    • Istiak Rayhan says

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

  11. says

    Hi,
    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!
    Ang

    • Istiak Rayhan says

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

  12. pradeep says

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

  13. 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.

  14. 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

  15. says

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

  16. 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.

  17. 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.

  18. 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’.

  19. Bel says

    Hello there, I use fashionista theme from wordpress.org 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.

  20. 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-content\themes\thesis\ 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

    -Neetu

    • 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.

  21. says

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

  22. 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.

  23. says

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

  24. 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.

Leave a Reply

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