Title: Exclude posts from search
Last modified: August 18, 2016

---

# Exclude posts from search

 *  [ronco](https://wordpress.org/support/users/ronco/)
 * (@ronco)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/exclude-posts-from-search/)
 * Can anyone suggest how I might exclude a category or post(s) from a user’s search
   results (when they use search from the sidebar)? Also, how can I avoid the comment
   list and form appearing when there is only a single result from the search? At
   the moment, if there’s more than one result, this doesn’t appear but if there’s
   only one result it does.

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

 *  [xratedfozzibaer](https://wordpress.org/support/users/xratedfozzibaer/)
 * (@xratedfozzibaer)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/exclude-posts-from-search/#post-175429)
 * Your first point is really interesting. Would like to know if that is possible.
 *  [ptryk](https://wordpress.org/support/users/ptryk/)
 * (@ptryk)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/exclude-posts-from-search/#post-175435)
 * for the 1st, see here ..
 * [http://wordpress.org/support/topic/4472](http://wordpress.org/support/topic/4472)
 * maybe it will help!? .. that is if you don’t mean (by specifying “search”ng in“..
   the sidebar”) a specific search location would give different results?
 * as for the second, i haven’t done it myself, but i think it shouldn’t be too 
   difficult by looking at the the default theme, comments.php .. it already has
   some good code with alternating post backgrounds.

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

The topic ‘Exclude posts from search’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [ptryk](https://wordpress.org/support/users/ptryk/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/exclude-posts-from-search/#post-175435)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
