Tag Info

Hot answers tagged


You can simply just use the post__in parameter inside your query arguments or inside your pre_get_posts action EXAMPLE (Adjust as necessary. Code requires at least PHP 5.4+ due to short array syntax ([])) $args = [ 'post__in' => range( 10, 15 ), ]; $q = get_posts( $args ); var_dump( $q );

Only top voted, non community-wiki answers of a minimum length are eligible