Sauter la navigation

[Résolu] How to Toggle View Loop Style from Front End?

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

I'd like to have a way to change the Loop style from the front end. Many websites I've visited have something like this to change the style from grid to list to table etc...

Solution:

There isn't such kind of built-in feature within Toolset Views/Blocks plugin, you might consider to create two views, but display them in different style(grid and list), then use custom JS codes to toggle to different view, for example:

Relevant Documentation:

https://api.jquery.com/toggle/

This support ticket is created Il y a 3 années et 5 mois. 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)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par NickC8880 Il y a 3 années et 5 mois.

Assisté par: Luo Yang.

Auteur
Publications
#2124809

I'd like to have a way to change the Loop style from the front end. Many websites I've visited have something like this to change the style from grid to list to table etc... In fact, a functionality like this is built into the BuddyBoss theme that I'm using.

Is this possible to do for Toolset Views in a reasonably accessible/low-code way?

You can see an example here, where you can toggle between grid and list view.
lien caché

#2124989

Hello,

There isn't such kind of built-in feature within Toolset Views/Blocks plugin, you might consider to create two views, but display them in different style(grid and list), then use custom JS codes to toggle to different view, for example:
lien caché

#2125381

Thanks for quickly confirming as well as finding a possible alternative!