Problem: I would like to use a View to display 100 results in reverse chronological order based on the post date.
Solution:
In the View Editor, find the Ordering section and choose post_date, descending. Change the Limit to 50 (this number will be overridden by code).,
add_filter( 'wpv_view_settings', 'tssupp_modify_filter_offset_view', 5, 2 ); function tssupp_modify_filter_offset_view( $view_settings, $view_id ) { $views = array( 12345 ); $max = 100; if ( in_array($view_id, $views) ) { $view_settings['limit'] = $max; } return $view_settings; }
Change 12345 to match the View's ID.
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 4 replies, has 2 voices.
Last updated by 5 years, 5 months ago.
Assisted by: Christian Cox.