admin管理员组

文章数量:1287828

i make it a custom page blog with 4 post per page but when i want to change the page, i get same posts from the first page. This is how is look my code `

<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'posts_per_page' =>4, 'post_type' => 'post' , 'order'=> 'DESC',  'orderby' => 'post_date', 'paged' => $paged,'post_status' => 'publish');
$postslist = new WP_Query( $args );
?>
<div class="container-of-dp">
<?php
if ( $postslist->have_posts() ) :
    while ( $postslist->have_posts() ) : $postslist->the_post(); ?>
        <div class="article-div">
             <img src="<?php echo get_the_post_thumbnail_url();?>"/>
            <a href="<?php the_permalink(); ?>"><?php the_title(); ?> </a><br />
            <small><?php the_time('F jS, Y') ?> by <?php the_author(); ?></small>
            <?php the_excerpt(); ?><br />
        </div>
    <?php endwhile; ?>
    
    </div>
    <div class="navigation-blog">
        <div class="alignright"><?php previous_posts_link( '&laquo; Previous ' ); ?></div>
        <div class="alignleft"><?php next_posts_link( 'Next  &raquo;', $postslist->max_num_pages ); ?></div>
    </div>
    </div>
    <?php wp_reset_postdata();
endif;
?>
</div>

本文标签: Pagination not give another posts