custom post type pagination
-
I cant get pagination on my custom post page to work with the following code:
<?php get_header(); ?> <section id="content"> <aside class="left-col"> <?php dynamic_sidebar( 'linker-sidebar' ); ?> </aside> <article class="right-col"> <section id="slider"> <?php nivo_slider( "home-slider" ); ?> </section> <ul class="productthumbnails"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $mijnProducten = new WP_Query( array( 'post_type' => 'producten', 'posts_per_page' => 3, 'orderby'=> 'menu_order', 'paged'=>$paged ) ); while( $mijnProducten->have_posts() ) : $mijnProducten->the_post(); ?> <li><?php the_post_thumbnail( 'postpage'); ?> <h2><?php the_title(); ?></h2> </li> <?php endwhile; ?> <div class="alignleft"><?php previous_posts_link('« Previous') ?></div> <div class="alignright"><?php next_posts_link('More »') ?></div> </ul> </article> </section> </div> <?php get_footer(); ?>
I was wondering how i can fix it and what I am doing wrong.
- The topic ‘custom post type pagination’ is closed to new replies.