Show number of pagination pages even when total under two

It’s not possible. paginate_links() is hard-coded to stop producing output as soon as it notices that there’ll be less than 2 pages. You can see this on lines 4130–4132 of the function’s source code here: https://developer.wordpress.org/reference/functions/paginate_links/#source The only workaround would be to copy the code of paginate_links() into your own new function and change the … Read more

Pagination not working – FrontPage

I use this on archive pages. If you are trying to use it elsewhere then that might be a cause of the issue. if ( ! function_exists( ‘_s_pagination_links’ ) ) : /** * Numbered pagination */ function _s_pagination_links() { global $wp_query; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1){ $current_page = max(1, get_query_var(‘paged’)); echo paginate_links(array( ‘base’ … Read more