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

返回介绍

the_post_navigation()

发布于 2017-09-11 字数1729 浏览 895 评论 0

the_post_navigation( array $args = array() )

Displays the navigation to next/previous post, when applicable.


描述


参数

$args

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

Default value: array()


源代码

File: wp-includes/link-template.php

function the_post_navigation( $args = array() ) {
	echo get_the_post_navigation( $args );
}

更新日志

Version 描述
4.1.0 Introduced.

相关函数

Uses

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

User Contributed Notes

  1. Skip to note content

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

    Contributed by aesbovis

    Customize your posts navigation to get posts in the same tag.

    
    the_post_navigation( array(
    			'prev_text'					 => __( 'prev chapter: %title' ),
    			'next_text'					 => __( 'next chapter: %title' ),
    			'in_same_term'				 => true,
    			'taxonomy'					 => __( 'post_tag' ),
    			'screen_reader_text' => __( 'Continue Reading' ),
    		) );
    

发布评论

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

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