Skip Navigation

[Resolved] WPML, separate Repeatable Field Groups and Layout

This support ticket is created 6 years 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 18 replies, has 2 voices.

Last updated by Nigel 5 years, 12 months ago.

Assisted by: Nigel.

Author
Posts
#1198654

Nigel thanks for that!

I checked your sandbox and everything was the same, except I use a bootstrap loop. So I added a bootstrap loop (wizarded) and added the conditionals back and, as you can see, it doesn't work. I didn't add anything but the conditional after the <loop> (I moved the old loop the the css section, just to keep it there 🙂 )

Weird!

#1198699

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-02-11 at 14.53.23.png

Aha!

It's not working there because the wpv-conditional shortcode is broken by the structure for the grid.

That closing wpv-conditional shortcode is part of the wpv-item index=pad-last section, it is only effective when that section is output.

You could move the wpv-conditional shortcode to the template itself, but the problem is you are liable to leave gaps in your grid (as I just described to another user here: https://toolset.com/forums/topic/display-posts-conditionally/#post-1198677).

If you want a grid for your results, in this case I think the only solution is to dispense with the Bootstrap grid and to make your own simple flexbox grid instead which would mean you no longer needed the wpv-item sections for the Loop output.

#1199072

Yes, so we basically found two Toolset + WPML limitations here, right? 🙂

I surely can create a flex grid on my own but since the bootstrap one works fine, and I already use it everywhere seems like a reverse overkill, if you allow me the expression.

Anyway, many thanks for your help THIS is real support! Unfortunately, my issue(s) aren't really solved due to a WPML + Toolset limitation, I believe.

Hopefully, this will be taken care of in the future.

#1199159

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The issue of gaps in a Bootstrap grid when you conditionally hide some of the elements is known but expected, it is how the Bootstrap grid works and there is nothing to fix as such.

A made a demo of a simple flexbox grid that you could employ here: hidden link

You just need to change the vars for number of columns, gap size, and min col width (which means you don't need to use media queries for the grid to stack on smaller screens).

As I mentioned before, you might want to submit a feature request if you want the root cause of the problem—how translations of related posts (and repeatable field groups) are managed through the default language—to be fixed.