Title: automatically adding some html code to each post
Last modified: August 18, 2016

---

# automatically adding some html code to each post

 *  [moneyeyes](https://wordpress.org/support/users/moneyeyes/)
 * (@moneyeyes)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/automatically-adding-some-html-code-to-each-post/)
 * I wanted to add some Google adsense code to each of my posts, curious if there
   is a way to configure this?
 * Thanks!

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/automatically-adding-some-html-code-to-each-post/#post-364372)
 * In your main index.php is this:
    `<?php endwhile; ?>` paste your code immediately
   above that. Do be aware that having too many ads will get you Google’s TOS problems.
 * Other ways of doing things are here:
    [http://www.tamba2.org.uk/wordpress/adsense/](http://www.tamba2.org.uk/wordpress/adsense/)
   and a search here for adsense will turn up more info and plugins.
 *  [colbert](https://wordpress.org/support/users/colbert/)
 * (@colbert)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/automatically-adding-some-html-code-to-each-post/#post-364408)
 * try this adsense plugin
 * [http://philhord.com/wp-hacks/adsense](http://philhord.com/wp-hacks/adsense)

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

The topic ‘automatically adding some html code to each post’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [colbert](https://wordpress.org/support/users/colbert/)
 * Last activity: [20 years, 1 month ago](https://wordpress.org/support/topic/automatically-adding-some-html-code-to-each-post/#post-364408)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
