I get as result of a main sql an array of post IDs, now what I need that Array of ids post to obtain the information and be presented in the following way:
<?php
$ids = [1,2,3,4,5];
// Here is some execution or process
// then I need to present the post as a normal loop
if ( have_posts() ) :
while ( have_posts() ) : the_post();
echo get_the_title();
endwhile;
endif;
wp_reset_query();
How can I run the ids and then display it in a loop?