Skip Navigation

[Resolved] Adding gallery to template built with theme builder

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

Problem:

Setup Gallery block in single post.

Solution:

You can follow our document to setup the Toolset Gallery Block

Relevant Documentation:

https://toolset.com/course-lesson/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields/

This support ticket is created 2 years, 9 months 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
- 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 16 replies, has 2 voices.

Last updated by leilaG 2 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#2296887

Hello, what is the best practice for adding a gallery into a page/template built with the avada theme builder?
I have a post type 'Space' that has a custom field multiple images.
I have tried making a Content template > adding a view > adding the gallery.
Then placing this code for the content template into the page [wpv-post-body view_template="CT for Space Image Gallery"]
It just shows 'No items found'
hidden link
hidden link
hidden link

#2298439

Hello,

Where do you put above content template shortcode? in another page?
If it is, you need to specific the post ID, like this:
[wpv-post-body view_template="CT for Space Image Gallery" item="123"]

Please replace 123 with the specific "Space" post ID, which has a custom field multiple images.

More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
numeric ID points to the ID of the post from which you want to retrieve data.

#2299055

Hello, we want it to pull through the gallery for the post that is being display.
hidden link
We don't to pull through just one gallery on one specific page. The code is placed here on our layout template - hidden link

Similar to what we did with our companies here, but this just displays one single image not a gallery.
hidden link
hidden link

#2299529

I assume we are talking about a custom repeating image field created with Toolset Types plugin.

If it is, you can follow our document to setup the Toolset Gallery Block:
https://toolset.com/course-lesson/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields/

#2299919

Yes, we have already followed that video and created the gallery, its now showing up on the page.
It just shows 'No items found'

#2300567

Toolset Gallery Block won't display 'No items found' result, are you using a post view?
If you need more assistance for it, please provide a test site with the same problem, I can setup a demo for you.

#2302681

I have tried the credentials you provided above, but it redirects me to 404 error page, please check it, make sure your staging website is ready to debug.

#2302911

That's strange, I just checked and clicked the link, copy pasted the credentials from here and they are working. I tried it 5 times, it takes you to the admin dashboard.

I can make a new login and send it if its still now working, could you please provide the private message to send new credentials.

#2304593

I have enabled the private message box again, please provide a valid admin account of your test site, thanks

#2305397

I have done below modifications in your website:
Edit the content template "CT for Space Image Gallery", add a Toolset gallery block, choose the image field "Space image", test it in frontend:
hidden link

It works fine

#2305667
galleries.png

Hello, I have checked and it's still showing galleries for all posts rather than the one gallery for its relating post.
hidden link
Example of what we are trying to achieve: hidden link

#2306229

It is displaying in your screenshot:
https://toolset.com/wp-content/uploads/2022/03/2305667-galleries.png

And I have done below modifications in your website:
Edit the content template:
hidden link
Remove the view block

Test again in frontend:
hidden link
You should be able to see images only from current "space" post.

And it is only a demo for your reference, please follow the document I mentioned above to customize the gallery block
https://toolset.com/course-lesson/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields/

#2308397

Great! Thank you!

I've replicated on the live site and all working okay.

I did notice that on the staging version at the top where it says 'View with' there was the option to select 'Office space...' Page but on my live version I am not able to select a space page. How do I select a space page to view it the content template?

#2309969
usage.jpg

If you want to apply same content template to all "Space" posts, you can edit your content template, in panel "Usage", enable option "Space", save the content template, you should be able to view with one of "Space" post, see my screenshot usage.JPG

More help:
https://toolset.com/course-lesson/creating-templates-to-display-custom-posts/

#2313231

Okay so I just enable it to bring through the content to view and then disable it after.

The content template for 'CT for Space Image Gallery' is now showing as a blank white page hidden link

All other content templates are showing correctly. I have copied over to the staging site and tested with the default theme and uninstalled all other plugins apart from toolset and its still showing as a blank white page.

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/the-content-template-is-showing-as-a-blank-white-page/