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:

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.

Was this article helpful?

Last Updated on

50 thoughts on “How to Add Google AdSense Ad Under Navigation Menu in WordPress”

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

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

  3. Adesanmi Adedotun

    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?

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

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


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

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

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

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

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

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

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

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

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

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

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

  13. 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? :(

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

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

  15. 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.. :-)

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

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top


Sign up below to get started:

Share via
Copy link
Powered by Social Snap