the_posts_pagination( array $args = array() )

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


Description Description


Parameters Parameters

$args

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

Default value: array()


Top ↑

Source Source

File: wp-includes/link-template.php

function the_posts_pagination( $args = array() ) {
	echo get_the_posts_pagination( $args );
}

Top ↑

Changelog Changelog

Changelog
Version Description
4.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note content
    Contributed by Codex

    Displays pagination with additional page links

    <?php the_posts_pagination( array( 'mid_size' => 2 ) ); ?>

    Displays pagination with alternative prev/next text

    <?php the_posts_pagination( array(
        'mid_size'  => 2,
        'prev_text' => __( 'Back', 'textdomain' ),
        'next_text' => __( 'Onward', 'textdomain' ),
    ) ); ?>
    

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