the_posts_pagination() - WordPress 函数参考中文文档

返回介绍

the_posts_pagination()

发布于 2017-09-11 字数1829 浏览 803 评论 0

the_posts_pagination( array $args = array() )

Displays a paginated navigation to next/previous set of posts, when applicable.


描述


参数

$args

(array)
(Optional)
See get_the_posts_pagination() for available arguments.

Default value: array()


源代码

File: wp-includes/link-template.php

function the_posts_pagination( $args = array() ) {
	echo get_the_posts_pagination( $args );
}

更新日志

Version 描述
4.1.0 Introduced.

相关函数

Uses

  • wp-includes/link-template.php:
    get_the_posts_pagination()

User Contributed Notes

  1. Skip to note content

    You must log in to vote on the helpfulness of this noteVote results for this note: 1You must log in to vote on the helpfulness of this note

    Contributed by Codex

    Displays pagination with additional page links

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

    Displays pagination with alternative prev/next text

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!