Set slider column count to return count
-
How can I set the Listing Slider column count to match the number of posts that are matched on an archive page, specifically when the slider is set to loop?
The problem I have is if the number of responsive columns is set to 6 and the current filter for the page matches less than 6 then the slider just repeats the posts again filling up all six columns (e.g if only 2 posts are returned, the same posts are repeated 3 times)
What I would like to do is
– set the max responsive column count to 6
– if 6 or less posts match then set the column count to match the posts matched count (and obviously no need to loop as all matches are being displayed)
– if more than 6 posts match then keep column count to six but allow slider to loop through posts
- The topic ‘Set slider column count to return count’ is closed to new replies.