Title: the_posts hook
Last modified: August 18, 2016

---

# the_posts hook

 *  [70mas](https://wordpress.org/support/users/70mas/)
 * (@70mas)
 * [19 years ago](https://wordpress.org/support/topic/the_posts-hook/)
 * Hi
 * I want to set up a the_posts hook to display adsense ads without having to modify
   templates.. It works, but how do I make sure that it will only add a post on 
   the beginning of multiple posts, not a single (on single, i want to use a the_content
   hook) and also not to add a post in administration?
 * Thx.

Viewing 1 replies (of 1 total)

 *  [buchannon](https://wordpress.org/support/users/buchannon/)
 * (@buchannon)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/the_posts-hook/#post-570077)
 * Check this page out:
    [http://codex.wordpress.org/Conditional_Tags#The_Main_Page](http://codex.wordpress.org/Conditional_Tags#The_Main_Page)
 * Do something like:
    if (is_single()) print_whatever_for_single_page(); else do_something_else();

Viewing 1 replies (of 1 total)

The topic ‘the_posts hook’ is closed to new replies.

## Tags

 * [the_posts](https://wordpress.org/support/topic-tag/the_posts/)

 * 1 reply
 * 2 participants
 * Last reply from: [buchannon](https://wordpress.org/support/users/buchannon/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/the_posts-hook/#post-570077)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
