Is it possible to have 2 Args with pre_get_posts?


Is it possible to use the pre_get_posts hook using two sets of args?

For example, if I want to modify my main loop to first display all products that have a tag sponsored and then display all the rest of the posts (excluding the original posts) in that category, is this possible with just one query, and using pre_get_posts?

The first set of args will pull in all posts with a tag sponsored and the second will display the rest, excluding the ones already displayed.

Is this possible?

Thank you

, , Edegist 3 years 2019-10-28T13:14:23-05:00 0 Answers 89 views 0

Leave an answer