46

Query loop builder: responsive data settings

declined
August 23, 2024

I would like to have responsive options for the data settings.

Most important, on desktop, I often want to show more items than on mobile. For example, I want to show 8 posts on desktop, and only 2 or 4 on mobile.

Also, pagination. I might want to load more items via infite scroll on desktop, but not on mobile.

And I might want to show one or more featured posts on desktop, but not on mobile, which would require a different offset setting.

2 responses to “Query loop builder: responsive data settings”

  1. GreenshiftWP Avatar

    This is technically not possible because wordpress has no option to change Query class depending on device

  2. info@yourlive.nl Avatar

    Ok, that’s too bad. But if you can make the breakpoints work the same way visibility options work, so the code isn’t loaded at all instead of just hiding it, this wouldn’t be a big problem. I could just use different query loops for different devices then.

    At the moment, I already save my loop cards as global patterns anyway, so I can easily use and manage all my cards even if there are in multiple query loops across multiple pages / templates.

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Voters