How can I use pre_get_posts filter to reset main query?

I want to use the filter in a page and reset the page query data and make a new query to display the latest posts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.