March 2020
Beginner
660 pages
18h 28m
English
We can use the following code to limit the search only to the specified set of posts:
$query->set( 'post__in', array('1','4','6') );
The post_in parameter allows us to specify an array with IDs of the allowed posts. Then, the other posts will not be considered in searching.
Read now
Unlock full access