Skip Navigation

[Resolved] How can I switch between loops in Views

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 5 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1307417

Hi, I have a picture gallery View which I want to display in two different kind of Loops by clicking the respective buttons: a Loop that displays pictures in Gallery format and another Loop which displays them in List format. How can I do that on-the-fly without reloading everything by clicking the 'Gallery' button and the 'List' button?

#1307553

Hello,

There isn't such kind of built-in feature within Views plugin, by default, one view can output only one kind of Loops:
"Gallery format" or "List format"

You might consider to create two different view:
- "Gallery format" view
- "List format" view

Put both above view in same page, setup custom HTML/JS codes, display them by clicking the 'Gallery' button and the 'List' button, for example jQuery toggle:
hidden link