Title: A code for Adsense?
Last modified: August 31, 2016

---

# A code for Adsense?

 *  [leeiah](https://wordpress.org/support/users/leeiah/)
 * (@leeiah)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/a-code-for-adsense/)
 * Good morning everyone. Can someone help me with a code to add in editor that 
   will place a google adsense ad right above my recipe plugin (EasyRecipePlus) 
   in every post? I don’t like using too many plugins, but am not adept at coding
   at this time.

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

 *  [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/a-code-for-adsense/#post-6911771)
 * Hi, if you don’t want to code then you can use the ad injection feature in my
   [Advanced Ads plugin](http://wordpress.org/plugins/advanced-ads/). I mention 
   it because I had other users of EasyRecipyPlus who accomplished the same with
   it.
 * Thomas
 *  Thread Starter [leeiah](https://wordpress.org/support/users/leeiah/)
 * (@leeiah)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/a-code-for-adsense/#post-6911800)
 * HI, Thomas. Thank you for your reply. Your plugin looks awesome, but I wanted
   to keep my plugin # down since I have too many already, which is why I asked 
   for a code. I’m learning to code, but just beginning.
 * If I do end up using your plugin, what settings will insure that my adsense ad(
   300 x 250) shows up right above every Easy Recipe ‘recipe’ in every post, for
   both mobile and desktop?
 *  [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/a-code-for-adsense/#post-6911801)
 * Hi leeiah,
 * without an extra plugin I see two ways:
 * 1. create your own shortcode that you can then place manually into the editor.
 * see [https://codex.wordpress.org/Shortcode_API](https://codex.wordpress.org/Shortcode_API)
 * 2. Use the the_content hook to inject the ad. If you select a priority slightly
   higher than from the Recipe plugin than you might be able to inject it automatically
   above it.
 * As it happens, an article about hooks that I wrote was just published on [Smashing Magazine](https://www.smashingmagazine.com/2016/01/get-started-with-hooks-wordpress/)
   🙂
 * With Advanced Ads you could use the provided shortcode of the ad or the content
   injection feature, maybe with adapting the priority as well.
 * Thomas
 *  Thread Starter [leeiah](https://wordpress.org/support/users/leeiah/)
 * (@leeiah)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/a-code-for-adsense/#post-6911814)
 * Thank you for all of that, Thomas. I think I’ll probably end up using your plugin
   after all. Great and super informative article at Smashing Magazine! I’ve bookmarked
   it permanently to learn from! 🙂

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

The topic ‘A code for Adsense?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [leeiah](https://wordpress.org/support/users/leeiah/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/a-code-for-adsense/#post-6911814)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
