Wordpress - List all posts (with proper_pagination)

后端 未结 3 880
离开以前
离开以前 2020-12-04 17:04

On the Wordpress site I\'m working on, it lists posts by category, but I am also after a page that lists ALL the posts (with pagination, showing 10 per page). How would I go

3条回答
  •  情歌与酒
    2020-12-04 17:47

    You could create a new page template with this loop in it:

     'post', 'posts_per_page' => 10, 'paged' => $paged );
    $wp_query = new WP_Query($args);
    while ( have_posts() ) : the_post(); ?>
        

    max_num_pages); ?>

提交回复
热议问题