ACF gallery with specific style

Hello,

is it possible to make ACF gallery like this?

Hello Ofir,

Thanks for writing in! Yes, it may be possible to create a grid layout for an ACF Gallery like the on on the screenshot above. You may have something like this element structure:

Section - Looper Provider 
   Row
    Column 1 - Looper Consumer (one only)
    Column 2 - 
       Row 
          Column - Looper Consumer (4 only)
   Row
    Column 1 - 
       Row 
          Column - Looper Consumer (4 only)
    Column 2 - Looper Consumer (one only)

Hope this makes sense.

Hello,

thank you for your reply.

I first thought about using grids but this seems maybe even better.

Additional questions.

So that would be a repeater with the field for one big image and 4 smaller and new row would have it again.

Is there a way to count the number of rows in Cornerstone that are used to add pictures? If there are even rows of images, to show correct display structure and if there are for example only 3 rows of pictures to show only 3 rows with left, right, left big images?

And I know you don’t have a lightbox effect on images, but is it possible to add it via 3rd party plugin?

Hello Ofir,

With the current version of the Pro theme, it will hardly identifies whether the total number of gallery images is odd or even so we can display 3 or 4 columns. If you wait for the Pro 6.5 release or Cornerstone 7.5, you can utilize the new Twig support.

The Modal element can act as a Lightbox element that you can use to display the bigger version of the gallery image. There are also other 3rd party plugins that you can use.

Best Regards.

Hello again,

when I try this how should I set up in acf? As a gallery element? Because when I try to loop in the second column only 4 images from the gallery element, I get nothing.

Best regards

Hey Ofir,

Please provide us with your WP details and the URL of the page where we can find your galley so that we can check your Looper settings. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Hello,

you have access now and you can change my gallery setup.

Best regards

Hello Ofir,

The sample structure I gave you is not suitable for your ACF field setup.

My example is only good for 1 ACF Gallery field. With your setup, you will need to have several Looper Providers and it will be nested which is more complicated. I would recommend using only 1 ACF Gallery Field.

Hope this makes sense.

Hello again,

It makes sense, but that isn’t what I’m trying to achieve. I want to enable the user to upload images without restricting how many gallery fields are prepared in advance.

I did try your structure but that doesn’t create new rows automatically. So even if I use one ACF Gallery field inside the repeater I still cannot access images. Can you please check on that? Also from your suggestion to use only 4 items in the second looper, how to skip the first item?

Hey Ofir,

Please check out the demo Section that I created on the page.

This structure is according to your current ACF Gallery set up.

Best Regards.

Hello,

this is what I tried to achieve. Thank you.

I see now how I can access the gallery field in Cornerstone.

Best regards,

Hi @ofirdoo,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.