Problem:
The customer wants to display more than 50 items on a single page. They are not following any documentation and do not have an example to reference.
Solution:
We informed the customer that currently, it is only possible to change the maximum items from 50 to a higher number using custom code. We provided the following code snippet to be added to their child theme's/theme's function.php file:
add_filter('wpv_filter_query', 'set_new_limit', 99, 3); function set_new_limit($query_args, $view_settings, $view_id) { $views = array(12345); if (in_array($view_id, $views)) { $query_args['posts_per_page'] = 100; } return $query_args; }
It is needed to replace 12345 with the numeric ID of the View and 100 with the maximum number of posts you want to display.
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 | 13:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Sao_Paulo (GMT-03:00)
This topic contains 1 reply, has 2 voices.
Last updated by 6 months, 1 week ago.
Assisted by: Mateus Getulio.