I am using paginate_links() along with pagination. It works whenever a number is clicked but if I click 3 dots stays there so no 4 pages can't be selected. Is there any workaround?
enter image description here

  • You will need to return up-to-date pagination controls in your AJAX response. FWIW this is why AJAX sites typically don't use numbered pagination. – Jacob Peattie Jan 7 at 1:08

You can use "mid_size" to manage number of pages to display in paginate_links() function. Please check https://developer.wordpress.org/reference/functions/paginate_links/ for pagination options. Please see example below to use mid_size.

$args = array( 
    'mid_size' => 3, 
    'prev_next' => true, 
    'prev_text' => '« Previous', 
    'next_text' => 'Next »', 

$result = paginate_links($args); 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.