Post Pagination Showing Same Posts Every Page at wordpress blog

Question

at WordPress blog Post Pagination Showing Same Posts Every Page

My loop

<?php
$args = array( 'numberposts' => 12, 'order'=> 'DESC', 'orderby' => 'date' );
$postslist = get_posts( $args );
foreach ($postslist as $post) :  setup_postdata($post); ?>

<div class="blogrollentry"> 

<p class="blogrolltitle"><?php the_title(); ?></p>

<div class="container-fluid no-padding">

<?php if ( has_post_thumbnail() ) { the_post_thumbnail('post-thumbnail', array('class' => 'blogpostimage1')); } else { ?>

<img src="<?php bloginfo('template_directory'); ?>/images/temp-h.jpg" class="blogpostimage1" alt="<?php the_title(); ?>" />

<?php } ?>    


</div>
<p><?php echo intro_textblog(350); ?></p>
<a class="btn btn-block btn-outline-dark my-2 my-sm-0 biggertext" href="<?php echo get_permalink(); ?>">Read More</a>

</div>    
<?php endforeach; ?>        

<?php if (  $wp_query->max_num_pages > 1 ) : ?>
                <div id="nav-below" class="navigation">
                    <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'BTC' ) ); ?></div>
                    <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'BTC' ) ); ?></div>
                </div><!-- #nav-below -->
<?php endif; ?> ``
0
Ahmed Tawfek 9 months 0 Answers 77 views 0

Leave an answer