Pagination not working
-
Hi!
I’ve got an issue with this plugin. This is how my loop looks like:
<?php $args = array( 'order'=> 'desc' ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); ?> <div class="row single-post"> <div class="col-lg-2"> <div class="date"><?php the_time('d.m.Y'); ?></div> </div> <div class="col-lg-9 content"> <?php the_post_thumbnail('post-thumbnail', array( 'class' => "img-responsive post-image")); ?> <h2><?php echo get_the_title(); ?></h2> <p class="single-content"><?php the_excerpt(); ?></p> <div class="post-meta"> <a href="<?php the_permalink(); ?>" title="Czytaj więcej" class="read-more">>> Czytaj więcej..</a> <p>Kategorie wpisu: <?php $category = get_the_category(); if($category[0]){ echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>'; } ?></p> </div> </div> </div> <?php endforeach; wp_reset_postdata();?> <?php wp_pagenavi(); ?>yet it shows all posts. Even if I use post_per_page e.g. 1, plugin dont divide posts into each page. why?
The topic ‘Pagination not working’ is closed to new replies.