Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
the_posts_pagination() - 在适用的情况下,显示下一页/上一页文章的分页导航 - WordPress函数 - WordPress动力
当前浏览:首页 / WordPress函数 / the_posts_pagination()

the_posts_pagination( array $args = array() )

在适用的情况下,显示下一页/上一页文章的分页导航


Warning: Undefined array key -1 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 185

Warning: Undefined array key 3 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 186

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "04f22ce25551d5855c7350030bd15821" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "90bc51819c89f7657afbc48dce2e8b1c" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "da3fa25e51008d111052e4f7cd1619a4" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

pagination

postsmore...

themore...


参数

$args

(array) (可选) 有关可用参数,请参见get_the_posts_pagination()。

默认值: array()



源码

查看源码 官方文档


更新日志

版本描述
4.1.0开始引入

使用示例

  • 示例1

    显示带有其他页面链接的分页

    <?php the_posts_pagination( array( 'mid_size' => 2 ) ); ?>

    显示带有可选上一页/下一页文本的分页

    <?php the_posts_pagination( array(
        'mid_size'  => 2,
        'prev_text' => __( 'Back', 'textdomain' ),
        'next_text' => __( 'Onward', 'textdomain' ),
    ) ); ?>