search: get minimum number of post for each post type

My first guess will be to run multiple custom queries on your search.php template in order to change post_type and posts_per_page It could look like that <?php $s = get_search_query(); $args_array = [ {‘s’ =>$s,’post_type’=>’products’,’posts_per_page’=>5}, {‘s’ =>$s,’post_type’=>’posts’,’posts_per_page’=>3}, {‘s’ =>$s,’post_type’=>’pages’,’posts_per_page’=>5}, ], foreach( $args_array as $args ) { $the_query = new WP_Query( $args ); while ( $the_query->have_posts() … Read more