Title: posts_request, admin or front-end
Last modified: August 19, 2016

---

# posts_request, admin or front-end

 *  Resolved [AndreSC](https://wordpress.org/support/users/andresc/)
 * (@andresc)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/posts_request-admin-or-front-end/)
 * when using the ‘posts_request’ hook in a plugin, what is the best way to determine
   if the function has been called by the front-end or by the manage posts page 
   in admin ?
 * Thanx

Viewing 1 replies (of 1 total)

 *  Thread Starter [AndreSC](https://wordpress.org/support/users/andresc/)
 * (@andresc)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/posts_request-admin-or-front-end/#post-666501)
 * I think the solution is if you have say
    `add_filter('posts_request','myfunction');`
 * and you do not want your function to have any effects when posts are listed in
   e.g. Manage > Posts
 *     ```
       function myfunction() {
       	global $wp_query;
       	if(!$wp_query->is_admin) {
               // do front-end stuff here
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘posts_request, admin or front-end’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [AndreSC](https://wordpress.org/support/users/andresc/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/posts_request-admin-or-front-end/#post-666501)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
