Custom post type page navigation / pagination not working
-
I have a problem whereby I have a page containing custom post types and the second page does not show the rest of the posts.
to expand a little further, I have 12 thumbnails on each page and the first 12 thumbnails are showing up in the second page instead of the second set of 12 thumbnails, if this makes sense?
Anyone know how to fix this problem, would be greatly appreciated.
Here’s my code to pull in the custom post types and the pagination.
<div class="postnm"> <?php query_posts( array( 'post_type' => 'portfolio', 'orderby' => 'menu_order', 'order' => 'ASC') ); ?> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); $c++; if( $c == 3) { $style = 'post-mvg nm one_third last'; $c = 0; } else $style='post-mvg one_third'; ?> <div <?php post_class($style) ?>> <div class="portimg"><a href="<?php the_permalink(); ?>"><img src="<?php echo get_field('company_logo') ?>"/></a></div> <!--<div class="small"><a href="</?php the_permalink(); ?>"></div>?php the_title(); ?></a></div>--> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php previous_posts_link('« show previous images') ?></div> <div class="alignright"><?php next_posts_link('Show more images »') ?></div></div> <?php endif; ?> <!-- Loop --> <?php $c=0; ?> </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom post type page navigation / pagination not working’ is closed to new replies.