what is not working?
do you get the ‘3 / 7’ numbers?
where are the next/prev links going to?
a link to your site might help to illustrate the issue.
Hi alchymyth,
The previous_posts_link/next_posts_link don’t recognise that there are posts to paginate to, so they don’t show up.
Yes the page number shows up but they don’t rely on the paginated data.
Link
I also tried to get that right. Does it have something to do with using wp_query?
I found this post today it may be just what you are looking for?
//The Query
<?php $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; ?>
// current page times the amount you want to show per page -chapeau Justin Tadlock
<?php $offset = ( 1 * $paged ) - 1; ?>
<?php $args=array(‘paged’=>$paged, 'posts_per_page'=>1, 'post_type'=>'issue', 'offset' => $offset); ?>
<?php query_posts($args); ?>
//The Loop
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
//what you want to display from the query… excerpt images etc..
<?php endwhile;?>
David
@adeptris && @martinleclercq
The issue is with the use of wp_query
replace that with query_posts and it works like a charm.
Do you mean I have to change it in how to address the loop for the custom post type?
How does your call for the custom post type loop then look like?
@martinleclercq my code now looks like this:
$paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1 ;
$args = array( 'order' => 'DESC', 'orderby' => 'date', 'paged' => $paged, 'post_type' => 'issue', 'posts_per_page' => 1 );
query_posts( $args );
if (have_posts()) :
while ( have_posts() ) : the_post();
...
ah yes, that’s it. Thanks