the_post_navigation( array $args = array() )

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


Description Description


Parameters Parameters

$args

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

Default value: array()


Top ↑

Source Source

File: wp-includes/link-template.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
4.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    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' ),
    		) );
    

You must log in before being able to contribute a note or feedback.