Page Navigation Not Working
-
I’m stumped. I’ve read through a ton of other posts but can’t find a solution. My page navigation just won’t add to my site. Can someone please take a look at the following code and see if they can figure it out? Thank you SO much!
<div id="home-blog" class="posts-list"> <?php if (have_posts()) :while (have_posts()) : the_post(); ?> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'paged' => $paged, 'orderby' => 'post_date' ); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?> <div <?php post_class();?> id="post-<?php the_ID();?>"> <div class="post-entry"> <p id="excerpt"><?php $customLength=20; echo get_the_excerpt(); ?></p> <?php wp_link_pages(array('before' => '<div class="pagination">' . __('Pages:', 'responsive'), 'after' => '</div>')); ?> </div><!-- end of .post-entry --> </div><!-- end of #post-<?php the_ID(); ?> --> <?php endforeach; ?> <?php endwhile; ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div class="navigation"><?php wp_pagenavi(); ?></div><!-- end of .navigation --> <?php endif; ?> <?php else : ?> <h1 class="title-404"><?php _e('404 — Fancy meeting you here!', 'responsive'); ?></h1> <?php endif; ?> </div><!-- end of #home-blog -->
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Page Navigation Not Working’ is closed to new replies.