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'
versteckter Link
versteckter Link
versteckter Link
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.
Hello, we want it to pull through the gallery for the post that is being display.
versteckter Link
We don't to pull through just one gallery on one specific page. The code is placed here on our layout template - versteckter Link
Similar to what we did with our companies here, but this just displays one single image not a gallery.
versteckter Link
versteckter Link
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/
Yes, we have already followed that video and created the gallery, its now showing up on the page.
It just shows 'No items found'
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.
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.
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.
I have enabled the private message box again, please provide a valid admin account of your test site, thanks
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:
versteckter Link
It works fine
Hello, I have checked and it's still showing galleries for all posts rather than the one gallery for its relating post.
versteckter Link
Example of what we are trying to achieve: versteckter Link
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:
versteckter Link
Remove the view block
Test again in frontend:
versteckter 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/
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?
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/
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 versteckter 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.