I’d like to make a slight customization to a post archive page, removing items from display if a meta value is set. Ideally, I’d like to use the existing archive template as-is otherwise. What is the best way to add this argument to the query? I was thinking that pre_get_posts would work, but I’m finding that when I put it in my archive template there is no effect.
I have a meta field that determines whether an article appears on the homepage or not, and I’d like it to also apply to a custom post type archive page. Otherwise, I don’t need to change the standard archive template at all (I have a copy renamed with the post type name), so I’d like to somehow just add this argument to the query. For example, retrieve all articles where hide_from_home != 1.