Hi there, I enabled Pagination Numbers in my views using the code's below. How do I limit the number of pages shown on a view. For instance, I have one page which is showing 36 pages in its pagination 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 etc……..
What I want it to do is show the first 6 then a next which will display another 2 paginations, and last. I have attached an image to illustrate this better.
Current code used:
In functions.php
// Add pagination numbers add_filter('wp_enqueue_scripts', 'my_cleanup_scripts', 11); function my_cleanup_scripts() { wp_dequeue_style( 'views-pagination-style' ); }
in the View
[wpv-filter-start] [wpv-pagination] <div class="controls-wrap"> <div class="controls-info">[wpml-string context="wpv-views"]Page [wpv-pager-current-page] of [wpv-pager-num-page][/wpml-string]</div> <div class="controls-container"> <div class="prevnext-page">[wpv-pager-prev-page][wpml-string context="wpv-views"]< [/wpml-string][/wpv-pager-prev-page]</div> <div class="current-page">[wpv-pager-current-page style="link"]</div> <div class="prevnext-page">[wpv-pager-next-page][wpml-string context="wpv-views"] >[/wpml-string][/wpv-pager-next-page]</div> </div> </div> [/wpv-pagination] [wpv-filter-end]
Thanks