I would like to query most of my pages and categories on the homepage. So far I am able to get the pages and category (posts), but I cannot order the list the way I want to. I want to be able to get a custom order like page, posts from a category, another page, and posts from another category.
I am using the following:
<?php
$args = array(
'cat' => $current,
'post_type' => array(
'page', 'post'),
'orderby' => 'ID' && array(2,4,1),
);
query_posts( $args );
while ( have_posts()) : the_post(); ?>
<?php // Include the page content template.
if ( is_page() ):
get_template_part( 'content', 'page' );
else:
get_template_part( 'content', 'post' );
endif;
?>
<?php endwhile;
?>
by the way I am using twentyfourteen and I don't want to have multiple queries to that job unless it doesn't put a burden on the web server. I want to save memory as much as I can.
'orderby' => array( 'ID' => array(2,4,1), 'ID' => 'ASC' )