Skip Navigation

[Resolved] Gallery alternating single landscape images with double portrait in one column

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to create an image gallery that alternates with a single landscape image on one row and two portrait images on another row.

Solution: Use a Toolset Gallery block with a custom Collage display mode, or a more complex system of Views and galleries, depending on how the custom fields are structured.

This support ticket is created 4 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by johnh-18 4 years ago.

Assisted by: Christian Cox.

Author
Posts
#1855863

Is it somehow possible using Toolset to create the kind of simple dynamic galleries that they use on this site - hidden link
Would toolset blocks be able to do this?
Best regards / john

#1855889

Hi, I can think of a few ways to implement something like this but it depends significantly upon how the image data is stored relative to the post or page being displayed. Are the images:
- stored in a repeating image field in the post being displayed? If so, you can use the Toolset Gallery block with a custom Collage display mode. I can show you how to set up a test site in our sandbox at https://discover-wp.com to try out this effect.
- stored in multiple repeating image fields in the post being displayed? If so, that's much more complicated because Toolset Blocks' built-in Gallery blocks only work with a single repeating custom field, not a combination of multiple custom fields.
- stored in a single image field, within a Repeatable Field Group (RFG) in the post being displayed? You'd need a View of that RFG, and some way to determine whether each image should be displayed in full-width or half-width columns. Sounds complex.
- stored in a repeating image field in multiple posts, related to the current post being displayed, using Toolset's Post Relationships? Again, a complex View is required here.
- stored in multiple repeating image fields in multiple posts, related to the current post being displayed, using Toolset's Post Relationships? Another even more complex View is required here.

Each of these scenarios has different implications for how the Gallery system would need to work, so I would need more information about how you plan to structure the custom fields used to store these images. I also want to point out that there's no built-in conditional logic in Toolset that will determine whether an image is landscape or portrait orientation, so there's no automation for gallery column counts based on the images being displayed in that gallery. That might complicate things in data entry. For example, it might mean you need separate custom fields for landscape and portrait images. Again, it really depends on how you plan to store the images relative to the post or page being displayed.

#1857237

Hi Christian,
Thank you for a very comprehensive answer. Having gone through the images, I do not believe that they are good enough so have found a different solution. But as always, you guys are always very helpful.
Best regards / john