<?php
query_posts(array(
'post_type' => 'portfolio', // can be custom post type
'orderby'=> 'menu_order',
'paged'=>$paged,
));
?>
we can adjust the number of post to be displayed in wp admin dash board settings > reading.
Thanks friends for your help.
I’ve just stocked in same point. What if people want to show 6 posts on their portfolio page but 10 posts on blog page. With your solution they need to use same listing number for these two pages. In my case I’ve products, photos, portfolio(s) and blog and i want to let the user choose different listing numbers for the parts of theme. We have to find another solution mate
By the way, Kayapati’s first code (same with mine) is working if you give smaller value, e.g: 1, for “Blog pages show at most” on reading settings. But it’s not the case because user may want to use a “plugin” and the plugin can be using the number. I think it’s a bug! What do you think guys?
I have almost the same problem as kayapati i hope somebody could help me. I found little diferent query for my custom post type but i’m newby in php and i don’t know how to aply the solution you guys post here to my case.
Here is my code:
<?php $recent = new WP_Query('post_type=pronun&posts_per_page=4'); while($recent->have_posts()) : $recent->the_post();?>
// some content
<?php endwhile; ?>
I am having problem not on the custom post type template page. But on the single page of that custom post type i created single post page for my custom type but the next_post_link() and previous_post_link() not displaying anything.