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!
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
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.
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.
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.