Using pre_get_posts with WP_Query

Posted by Prem Tiwari | Updated on

The simplest way is to add the action right before the query and remove it immediately after.

and in the template:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers