Title: pre_get_posts, custom post types &amp; custom fields
Last modified: August 21, 2016

---

# pre_get_posts, custom post types & custom fields

 *  [Brandy](https://wordpress.org/support/users/mommysplurge/)
 * (@mommysplurge)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/pre_get_posts-custom-post-types-custom-fields/)
 * I have altered my functions to show 3 post types plus the default post in my 
   RSS feed & home page. I want to finesse it a little further and exclude posts
   from 2 of the taxonomies with a custom field set to a value of 1. And keep all
   regular post types and all of the first custom post type. I usually do this with
   pre_get_posts, but I don’t know how to set it up. I copied the function from 
   somewhere and am unsure how to construct it to do this.
 * If anyone could point me to a resource or help me out, I’d greatly appreciate
   it!

The topic ‘pre_get_posts, custom post types & custom fields’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [Brandy](https://wordpress.org/support/users/mommysplurge/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/pre_get_posts-custom-post-types-custom-fields/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
