Problem:
The user would like to use different view's items count per screen. For example, display 9 posts in Desktop and only 3 posts in mobile.
Solution:
Currently, there is no option or setting to change the number of posts per view depending on the screen/device. You can only do it using two views. Put each one inside a container block, and make them show or hide depending the screen.
There is also a hook you can use to programmatically change the settings of a view. The wpv_view_settings hook. Check the example code on it.
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 |
---|---|---|---|---|---|---|
9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - | - | 9:00 – 13:00 |
14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - | - | 14:00 – 18:00 |
Supporter timezone: Africa/Casablanca (GMT+01:00)
This topic contains 2 replies, has 2 voices.
Last updated by 3 years, 8 months ago.
Assisted by: Jamal.