I displayed all the post from all the post type in the page. Now i want to display all the latest post from all the post type. I want only one post from all the post type.
To display all the post from all post type i used the following code.
<?php query_posts(array('post_type'=>array('a','b','c'), 'posts_per_page' => 2)); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div class="issue-content">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail();} ?>
<?php get_template_part( 'content-issues', 'page' ); ?>
<?php comments_template( '', true ); ?>
</div><!--issue-content-->
<?php endwhile; // end of the loop. ?>
i tried with the following code
<?php query_posts(array('post_type'=>array('a','b','c'), 'posts_per_page' => 1)); ?>
i cant get from all the post type. How can i get the latest post from all the post type.
You should use multiple
query_posts()