@lindsey.homenick
To add page pagination on a custom Wordpress page, follow these steps:
1 2 3 4 5 6 7 8 9 10 11 12 |
function custom_pagination() { global $wp_query; $pager = 999999999; echo paginate_links(array( 'base' => str_replace($pager, '%#%', esc_url(get_pagenum_link($pager))), 'format' => '?paged=%#%', 'current' => max(1, get_query_var('paged')), 'total' => $wp_query->max_num_pages, )); } |
1
|
<?php custom_pagination(); ?> |
Now, when you view your custom Wordpress page, you should see the pagination at the specified location. The pagination will automatically adjust based on the number of pages in your query.