Custom Post Type Pagination not workng
-
For some reason this exact code works on author.php, but only for 1 author not the other and it doesn’t work on my custom template page. What am I doing wrong?
<?php /** * Template Name: pagination test */ get_header(); ?> <?php //get_sidebar(); ?> <div id="page-left"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $loop = new WP_Query( array( 'post_type' => 'filmmaking', 'posts_per_page' => 2, 'paged'=> $paged ) ); ?> <?php if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php endwhile; ?> <?php endif; wp_reset_postdata(); ?> <?php previous_posts_link('« Nyare') ?> <?php next_posts_link(' ?ldre »') ?> </div><!-- page left --> <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom Post Type Pagination not workng’ is closed to new replies.