Title: Hide Some Custom Posts
Last modified: August 30, 2016

---

# Hide Some Custom Posts

 *  [OllyDowning](https://wordpress.org/support/users/ollydowning/)
 * (@ollydowning)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/hide-custom-posts/)
 * Hello All,
 * I have a custom post type which each user is able to edit one of. I want to make
   it so each user can only see the post they can edit since there are two pages
   of posts and it takes a long time to find a specific post.
 * I’m presuming I would have to use a filter but I’m not really sure where I would
   go from there. All guidance/assistance will be greatly appreciated.
 * Thanks everyone.

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/hide-custom-posts/#post-6875205)
 * You use an action actually, ‘restrict_manage_posts’. The post type is passed 
   as a parameter to your callback. From your callback, if the post type is correct,
   output a dropdown form field named ‘author’. The first option would be ‘All Authors’
   with a empty string value. Then list the other authors, each with their ID as
   the option value. `wp_dropdown_users()` should get you pretty close to the needed
   output, though some adjustment may be required through the ‘wp_dropdown_users’
   filter.
 * How this works is your author dropdown appears along with the other dropdown 
   filters like date and category. When an author is selected (let’s say the selected
   ID is 5) and the ‘Filter’ button is clicked, a GET request is sent with `&author
   =5` appended to the URL. The page already knows how to deal with an “author” 
   query argument from the existing ‘click-on-author-name-to-filter’ functionality.
   You are just providing an alternate way to add the same argument.

Viewing 1 replies (of 1 total)

The topic ‘Hide Some Custom Posts’ is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * 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: [10 years, 5 months ago](https://wordpress.org/support/topic/hide-custom-posts/#post-6875205)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
