On this page
the_posts_pagination( array $args = array() )
Displays a paginated navigation to next/previous set of posts, when applicable.
Parameters
$argsarray Optional-
See get_the_posts_pagination() for available arguments.
More Arguments from get_the_posts_pagination( ... $args )
Array or string of arguments for generating paginated links for archives.
basestringBase of the paginated url.formatstringFormat for the pagination structure.totalintThe total amount of pages. Default is the value WP_Query'smax_num_pagesor 1.currentintThe current page number. Default is'paged'query var or 1.aria_currentstringThe value for the aria-current attribute. Possible values are'page','step','location','date','time','true','false'. Default is'page'.show_allboolWhether to show all pages. Default false.end_sizeintHow many numbers on either the start and the end list edges.
Default 1.mid_sizeintHow many numbers to either side of the current pages. Default 2.prev_nextboolWhether to include the previous and next links in the list. Default true.prev_textstringThe previous page text. Default '« Previous'.next_textstringThe next page text. Default 'Next »'.typestringControls format of the returned value. Possible values are'plain','array'and'list'. Default is'plain'.add_argsarrayAn array of query args to add. Default false.add_fragmentstringA string to append to each link.before_page_numberstringA string to appear before the page number.after_page_numberstringA string to append after the page number.
Default:
array()
Source
File: wp-includes/link-template.php. View all references
function the_posts_pagination( $args = array() ) {
echo get_the_posts_pagination( $args );
}
Related
Uses
| Uses | Description |
|---|---|
| get_the_posts_pagination() wp-includes/link-template.php | Retrieves a paginated navigation to next/previous set of posts, 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_posts_pagination