Problem: I would like to be able to show more than 50 results per page using pagination, but I don't have the option to set a higher value using the GUI.
Solution: Use the wpv_view_settings filter to manually set the number of posts per page. Note that the number will not appear accurately in the form settings GUI, but will function as expected.
//Modify the limit and/or offset settings of a given View to use a number greater than 50: add_filter( 'wpv_view_settings', 'prefix_modify_filter_offset_view', 5, 2 ); function prefix_modify_filter_offset_view( $view_settings, $view_id ) { if ( $view_id == 374 ) { // modify 374 to match your View ID $pagination = $view_settings['pagination']; // get the pagination settings $pagination['posts_per_page'] = 100; // modify this number accordingly $view_settings['pagination'] = $pagination; // save with updated pagination settings } return $view_settings; }
Relevant Documentation: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_view_settings
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 6 replies, has 2 voices.
Last updated by 7 years, 7 months ago.
Assisted by: Christian Cox.