2020-05-01 / 3587阅 / 悠然
Retrieves the adjacent post.
Can either be next or previous post.
(bool)
(Optional)
Whether post should be in a same taxonomy term.
Default value: false
(array|string)
(Optional)
Array or comma-separated list of excluded term IDs.
Default value: ''
(bool)
(Optional)
Whether to retrieve previous post. Default true
Default value: true
(string)
(Optional)
Taxonomy, if $in_same_term is true.
Default value: 'category'
(null|string|WP_Post) Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.