I wish to question most of my pages and classes on the homepage. To date I’m able to get the pages and class (posts), however I can not order the listing the best way I need to. I need to have the ability to get a customized order like web page, posts from a class, one other web page, and posts from one other class.
I’m utilizing the next:
<?php
$args = array(
'cat' => $present,
'post_type' => array(
'web page', 'publish'),
'orderby' => 'ID' && array(2,4,1),
);
query_posts( $args );
whereas ( have_posts()) : the_post(); ?>
<?php // Embody the web page content material template.
if ( is_page() ):
get_template_part( 'content material', 'web page' );
else:
get_template_part( 'content material', 'publish' );
endif;
?>
<?php endwhile;
?>
by the best way I’m utilizing twentyfourteen and I do not need to have a number of queries to that job except it would not put a burden on the internet server. I need to save reminiscence as a lot as I can.