Displays a paginated navigation to next/previous set of posts, when applicable.
$argsarrayoptional
base stringformat stringtotal intmax_num_pages or 1.current int'paged' query var or 1.aria_current string'page', 'step', 'location', 'date', 'time', 'true', 'false'. Default is 'page'.show_all boolend_size intmid_size intprev_next boolprev_text stringnext_text stringtype string'plain', 'array' and 'list'. Default is 'plain'.add_args arrayadd_fragment stringbefore_page_number stringafter_page_number stringDefault:array()
function the_posts_pagination( $args = array() ) {
echo get_the_posts_pagination( $args );
}
| Version | Description |
|---|---|
| 4.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/the_posts_pagination