Title: Hiding certain posts based on a condition
Last modified: August 21, 2016

---

# Hiding certain posts based on a condition

 *  [wazzaday](https://wordpress.org/support/users/wazzaday/)
 * (@wazzaday)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/hiding-certain-posts-based-on-a-condition/)
 * I have a custom post type, called users, when a post is generated (via front 
   end) it is given a date 5 days in the future. I want to hide all posts in the
   dashboard that are not 5 days old yet, and only have them appear after that. 
   Any ideas?

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/hiding-certain-posts-based-on-a-condition/#post-4387017)
 * Try hooking the ‘request’ filter. Check `$_SERVER['REQUEST_URI']` to ensure the
   request is for the edit page of your post type. If so add a date_query parameter
   to the query for posts before 5 days ago.

Viewing 1 replies (of 1 total)

The topic ‘Hiding certain posts based on a condition’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/hiding-certain-posts-based-on-a-condition/#post-4387017)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
