I am using Wordpress. I have the following query to retrieve data from a database and it works fine
$args1 = array( 'post_type' => 'gallery', 'posts_per_page' => $gnum, 'post__in' => array(400, 403), 'paged' => $paged, 'orderby' => 'title', 'order' => 'ASC' ); query_posts($args1); <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
Using 'post__in' => array(400, 403), in the above query, I retrieve the rows where ID = '400' AND '403'. Therefore, when I echo, I receive only two information.
Now I'm trying to get all the data from the table, but when I show the information, I want to get a row where first the identifier is 400, then 403, and then the rest of the rows based on 'orderby' => 'title', AND 'order' => ' ASC '
Could you help with the request?
thanks
Edit
$args2 = array( 'post_type' => 'gallery', 'posts_per_page' => $gnum, 'post__not_in' => array(400, 403), 'paged' => $paged, 'orderby' => 'title', 'order' => 'ASC' ); query_posts($args2);
source share