how to run multiple query in a single page
-
$the_query1 = new WP_Query(‘showposts=1’);
while ($the_query1 -> have_posts()) : $the_query1 -> the_post();
if (get_field(“choice”) == “arvind”){
echo “arvind += “;
echo get_the_title();
echo “
“;
}
endwhile;
wp_reset_query();
$the_query = new WP_Query(‘showposts=1’);
while ($the_query -> have_posts()) : $the_query -> the_post();
if (get_field(“choice”) == “general”){
echo “general += “;
echo get_the_title();
echo “
“;
}
endwhile;
wp_reset_query();
- The topic ‘how to run multiple query in a single page’ is closed to new replies.