[Plugin:WP-PageNavi] Pagination not showing up
-
I am using the following loop and somehow it doesn’t show the pagination. I am using WP-PageNavi plugin, but even if I use wordpress pagination it just doesn’t show the links at all. What am I missing here?
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'posts_per_page' => 2, 'order' => 'DESC', 'post_type' => 'news', 'paged' => $paged ); $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); $news_items = get_group('news_item'); // print_r($news_items); foreach($news_items as $news_item){ echo '<h2><a href="'; the_permalink(); echo '">'; the_title(); echo '</a></h2>'; the_time('m/m/y'); echo "<br>"; echo get_the_term_list( $post->ID, 'news_categorie', '<p>Language: ', ', ', '</p>' ); $news_item_imgs = $news_item['news_item_image']; echo "1.<br>"; foreach ($news_item_imgs as $img) { print_r( $img['original'] ); echo "<br>"; } echo "2. "; print_r( $news_item['news_item_copy'][1] ); echo "<br><br>"; } previous_posts_link('« Newer'); next_posts_link('Older »'); endwhile; else: _e( 'Sorry, no posts matched your criteria.' ); endif; wp_pagenavi(); wp_reset_query();
- The topic ‘[Plugin:WP-PageNavi] Pagination not showing up’ is closed to new replies.