posts_nav_link

函数


posts_nav_link ( $sep = '', $prelabel = '', $nxtlabel = '' )
参数
  • (string)
    $sep
    Optional. Separator for posts navigation links. Default empty.
    Required:
    Default: (empty)
  • (string)
    $prelabel
    Optional. Label for previous pages. Default empty.
    Required:
    Default: (empty)
  • (string)
    $nxtlabel
    Optional Label for next pages. Default empty.
    Required:
    Default: (empty)
定义位置
  • wp-includes/link-template.php
    , line 2670
引入
0.71
弃用

显示上一页和下一页的文章页面链接导航。

function posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' ) {
	$args = array_filter( compact( 'sep', 'prelabel', 'nxtlabel' ) );
	echo get_posts_nav_link( $args );
}