Title: Adding Adsense code in hooks
Last modified: August 22, 2016

---

# Adding Adsense code in hooks

 *  Resolved [gitika18](https://wordpress.org/support/users/gitika18/)
 * (@gitika18)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/)
 * I was trying to add a Google ad sense code in one of the hooks (after the right
   sidebar content) assuming it’d display after the last side bar widget. Google
   instructions asks to add the code in ‘the HTML source of the page where I want
   the add to appear’. Saved the settings in the hook and it doesn’t show anything
   on the site. I was trying to see how it works 🙁
    What am I missing?
 * Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5584728)
 * What you did should work – Adsense sometimes takes around an hour to first display
   the ad – if you’d like to include your URL I can take a peak and see if I can
   see the code in the background 🙂
 *  Thread Starter [gitika18](https://wordpress.org/support/users/gitika18/)
 * (@gitika18)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5584746)
 * Here- [http://www.plantbasedhealthy.com/](http://www.plantbasedhealthy.com/)
 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5584773)
 * I’m seeing the code below the sidebar 🙂
 *  Thread Starter [gitika18](https://wordpress.org/support/users/gitika18/)
 * (@gitika18)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5584977)
 * I was not able to see the ads until today. But it did not show up when I was 
   checking yesterday even after your could see the code. I don’t know what is wrong.
   I also could not see the page header spacing y’day.
 * Anyways, now the ad unit displays but doesn’t fit right under the widgets. It
   would look better if the width is same as the widgets. Is there a way to change
   the width of the ad unit? In the adsense this is the standard size for a long-
   vertical unit.
    Thanks.
 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5584983)
 * You’ll either need to choose an ad that is less wide, or increase the width of
   your sidebar 🙂
 *  Thread Starter [gitika18](https://wordpress.org/support/users/gitika18/)
 * (@gitika18)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5585014)
 * That’s their standard size for vertical ad units. And increasing width of sidebar
   still doesn’t do the job as the change can only be by 25%,30%… (difference of
   5) and so on.. one can’t put a number of choice and test. Anyways, I’ll check
   if I can customize the ad unit on google later.
    Thanks.
 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5585019)
 * Have you taken a look at creating custom ad units? [https://support.google.com/adsense/answer/3289364?hl=en](https://support.google.com/adsense/answer/3289364?hl=en)
 *  Thread Starter [gitika18](https://wordpress.org/support/users/gitika18/)
 * (@gitika18)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5585034)
 * Thanks for the link! That’ll help 🙂
 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5585038)
 * Awesome 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Adding Adsense code in hooks’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

## Tags

 * [Ad codes](https://wordpress.org/support/topic-tag/ad-codes/)

 * 9 replies
 * 2 participants
 * Last reply from: [Tom](https://wordpress.org/support/users/edge22/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/adding-adsense-code-in-hooks/#post-5585038)
 * Status: resolved