Why won't my pagination show up? (Custom Post Type)
-
Hello, I have a custom post type that I’m listing on a page. Everything shows up fine; it’s showing the right number of posts, only the pagination won’t show up. What am I missing here? Seems like something small and simple I’m just not seeing:
<?php $postId = get_the_ID(); $args = array('post_type' => 'news', 'post_status' => 'publish', 'order' => 'desc', 'posts_per_page' => '10' ); $loop = new WP_Query($args); while ( $loop->have_posts() ) : $loop->the_post(); $newsId = $loop->post->ID; $newsLink = get_permalink($newsId); $newsExcerpt = get_excerpt($newsId); $content = get_the_content(); $smallContent = substr($content, 0, 300); if($newsExcerpt =="") $newsExcerpt = $smallContent; ?> <div class="row-fluid post-grid"> <p class="post-date"><?php the_date('l, F j, Y');?></p> <h3><a href="<?php echo $newsLink;?>"><?php the_title();?></a></h3> <p><?php echo $newsExcerpt;?></p> </div> <?php endwhile;?> <?php if(function_exists('wp_simple_pagination')) { wp_simple_pagination(); } ?>
Thank you in advance for any help at all!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Why won't my pagination show up? (Custom Post Type)’ is closed to new replies.