Displays the navigation to next/previous post, when applicable.
$argsarrayoptional
prev_text string'%title'.next_text string'%title'.in_same_term boolexcluded_terms int[]|stringtaxonomy string$in_same_term is true. Default 'category'.screen_reader_text stringaria_label string'Posts'.class string'post-navigation'.Default:array()
function the_post_navigation( $args = array() ) {
echo get_the_post_navigation( $args );
}
| Version | Description |
|---|---|
| 4.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/the_post_navigation