WordPress Pagination with ajax - Dots

I am using paginate_links() along with pagination. It works whenever a number is clicked but if I click 3 dots stays the

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?

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?

Share Improve this question asked Jan 6, 2020 at 12:17 user145078user145078 1
  • 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 Commented Jan 7, 2020 at 1:08
Add a comment  | 

1 Answer 1

Reset to default -1

You can use "mid_size" to manage number of pages to display in paginate_links() function. Please check https://developer.wordpress/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); 

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744857696a4597506.html

相关推荐

  • WordPress Pagination with ajax - Dots

    I am using paginate_links() along with pagination. It works whenever a number is clicked but if I click 3 dots stays the

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信