On this page
the_post_navigation( array $args = array() )
Displays the navigation to next/previous post, when applicable.
Parameters
$argsarray Optional-
See get_the_post_navigation() for available arguments.
More Arguments from get_the_post_navigation( ... $args )
Default post navigation arguments.
prev_textstringAnchor text to display in the previous post link. Default'%title'.next_textstringAnchor text to display in the next post link. Default'%title'.in_same_termboolWhether link should be in a same taxonomy term. Default false.excluded_termsint[]|stringArray or comma-separated list of excluded term IDs.taxonomystringTaxonomy, if$in_same_termis true. Default'category'.screen_reader_textstringScreen reader text for the nav element. Default 'Post navigation'.aria_labelstringARIA label text for the nav element. Default'Posts'.classstringCustom class for the nav element. Default'post-navigation'.
Default:
array()
Source
File: wp-includes/link-template.php. View all references
function the_post_navigation( $args = array() ) {
echo get_the_post_navigation( $args );
}
Related
Uses
| Uses | Description |
|---|---|
| get_the_post_navigation() wp-includes/link-template.php | Retrieves the navigation to next/previous post, when applicable. |
Changelog
| Version | Description |
|---|---|
| 4.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/the_post_navigation