CPT Portfolio Pagination Not Working
-
Hi, I am trying to get the pagination of my Custom Post Type Portfolio to work and everytime I click on “Next Page”, the same 9 items appear.. Any suggestions? Below is a watered down version of my template.
<?php get_header(); query_posts('post_type=portfolio&posts_per_page=9'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $title= str_ireplace('"', '', trim(get_the_title())); $desc= str_ireplace('"', '', trim(get_the_content())); ?> <div class="img"><a title="<?php echo $title ?>: <?php echo $desc ?>" rel="lightbox[work]" href="<?php print portfolio_thumbnail_url($post->ID) ?>"><?php the_post_thumbnail(); ?></a></div> <h2><?php echo $title ?></h2> <p><?php print get_the_excerpt(); ?></p> <?php $site= get_post_custom_values('projLink'); if($site[0] != ""){ ?> <?php }else{ ?> <?php } ?> <?php endwhile; endif; ?> <?php posts_nav_link(); ?> <?php get_footer(); ?>
Tried various things and just couldnt get it to work..
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘CPT Portfolio Pagination Not Working’ is closed to new replies.