1. Home
  2. Docs
  3. Responsive Posts Carousel
  4. Developers
  5. rpc_query_args


It’s a filter hook, that applies to the WP_Query args before rendering. You can use this filter for advanced post filtration, taxonomy or terms related queries.



A Complex Structure

Let’s use it further for complex queries, suppose you want to display 4 latest posts on a slider from 3 different categories.

Example Scenario:

  • 2 latest posts from Category having ID 87
  • 1 latest post from category having ID 96
  • 1 latest post from category having ID 100

So, you have to paste the following code in the functions.php file of your theme/child theme and it will do the job.

You can also modify it as you like.