Accueil › Toolset Professional Support › [Résolu] Hide column that is empty in loop
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)
Marqué : Views, Views plugin
Ce sujet contient 1 réponse, a 2 voix.
Dernière mise à jour par Luo Yang Il y a 5 années et 11 mois.
Assisté par: Luo Yang.
I have a 4 columns loop to display the categories of its parent taxonomy. I have a taxonomy that only have 3 categories to display. The loop still outputs 4 columns, leaving the last empty. That column unable me to center the container with css. What are my options with in this case? Thank you.
Hello,
It is expected result, in your screenshot:
lien caché
you are using Bootstrap grid mode, each item has a CSS class "col-sm-3"
in Bootstrap gird mode, each row has 12 columns, so each item take 1/4 width of row, see bootstrap document:
lien caché
And it conducts the issue as you mentioned above:
The loop still outputs 4 columns, leaving the last empty
If you want each row to display 3 items only, then you will need to setup the "bootstrap grid" again, use option:
Number of column: 3
See our document:
https://toolset.com/documentation/user-guides/view-layouts-101/#bootstrap
Screenshot:
lien caché