Ready to get started?Download WordPress


pre_get_posts, custom post types & custom fields (1 post)

  1. mommysplurge
    Posted 8 months ago #

    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!


You must log in to post.

About this Topic