Skip Navigation

[Resolved] Trouble displaying image grid in custom post type

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)

This topic contains 4 replies, has 2 voices.

Last updated by Luo Yang 1 year, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2587531

Hello Toolset Support,

I am having trouble displaying an image grid in my custom post type. Here's the background:

I have created a custom post type using Toolset, and I have added the option to add images to this post type (with multiple instances).
I would like to display a simple image grid that shows all the images added to the post, ideally with the ability to click on each image and view it in a lightbox.

Here are my questions:

What's the best way to create a view that displays an image grid with the images added to my custom post type?

How can I make each image clickable so that it opens up in a lightbox?
I appreciate any guidance you can provide on this matter.

#2587887
#2588013

i'm using divi and toolset views. can i use the blocks also? and do you have any tutorials for this?

#2588265

How can I display multiple images in a grid using Toolset Blocks without deactivating my Views plugin that I need for the rest of my content? Is there a workaround to achieve this without compromising the functionality of my website?

i prefer to use views instead of blocks. This should be a fairly simple thing to do i think.

#2588583

You can use [wpv-for-each] to display the multiple instances custom image field, see our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153482
Iterate through multiple items in a post meta field and output the enclosed text for each item. Including Types repeating fields.