I have a post type that I've registered using "public" => false, "publicly_queryable" => true
, because I don't want singles, but I do want these posts to show up on a custom taxonomy archive. With "public" => false
, I can't get the posts to appear in the loop on the custom taxonomy archive.
I've tried searching for a solution to this, but I keep coming across "include public and private posts in loop," which isn't exactly what I'm looking for, as I still want the user to be able to set these posts to "private" if they desire.
How can I include a private post type in a loop using the pre_get_posts
filter to modify the query?