the_posts_navigation( array $args = array() )

In this article

Displays the navigation to next/previous set of posts, when applicable.

Parameters

$argsarrayoptional
See get_the_posts_navigation() for available arguments.
More Arguments from get_the_posts_navigation( … $args )Default posts navigation arguments.
  • prev_text string
    Anchor text to display in the previous posts link.
    Default ‘Older posts’.
  • next_text string
    Anchor text to display in the next posts link.
    Default ‘Newer posts’.
  • screen_reader_text string
    Screen reader text for the nav element.
    Default ‘Posts navigation’.
  • aria_label string
    ARIA label text for the nav element. Default 'Posts'.
  • class string
    Custom class for the nav element. Default 'posts-navigation'.

Default:array()

Source

function the_posts_navigation( $args = array() ) {
	echo get_the_posts_navigation( $args );
}

Changelog

VersionDescription
4.1.0Introduced.

User Contributed Notes

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