Problem:
The issue here is that our view only allows a maximum of 50 posts per page when using the pagination settings. However this user wanted to increase this to 70.
Solution:
This can be done by using the code below. Add the following to your Toolset custom code settings at Toolset->Settings->Custom Code. Once you've done this please ensure that you've activated it as well as change the ID 123 to the ID of your view.
//Increase the page limit beyond 50
add_filter( 'wpv_filter_query', 'wpcf_increase_pagination',99,3 );
function wpcf_increase_pagination( $query_args, $view_settings, $view_id ) {
if ($view_id == 123 ) { //Edit
$query_args['posts_per_page'] = 70;
}
return $query_args;
}
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 |
|---|---|---|---|---|---|---|
| - | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
| - | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 2 replies, has 2 voices.
Last updated by 3 years, 11 months ago.
Assisted by: Shane.