首页 WordPress函数大全 get_the_post_navigation()

get_the_post_navigation()

2020-05-02 / 2565阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_the_post_navigation( array $args = array() )

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

描述

参数

$args

(array)
(Optional)
Default post navigation arguments.

  • 'prev_text'
    (string) Anchor text to display in the previous post link. Default '%title'.
  • 'next_text'
    (string) Anchor text to display in the next post link. Default '%title'.
  • 'in_same_term'
    (bool) Whether link should be in a same taxonomy term. Default false.
  • 'excluded_terms'
    (array|string) Array or comma-separated list of excluded term IDs.
  • 'taxonomy'
    (string) Taxonomy, if $in_same_term is true. Default 'category'.
  • 'screen_reader_text'
    (string) Screen reader text for the nav element. Default 'Post navigation'.
  • 'aria_label'
    (string) ARIA label text for the nav element. Default 'Posts'.

Default value: array()

返回

(string) Markup for post links.

大家谈论
    我的见解