Skip Navigation

[Résolu] Display a WordPress Gallery with Toolset

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
Can we create a WordPress Gallery and laterd display that gallery or re-use the images added to it in Toolset?

Solution:
No, those galleries are a WordPress features, which create Galleries all coded by WordPress core.

In Views, you can basically produce the same, by creating sliders.

WordPress simply takes a few attachment ID's (Media, which you can query in Views too), and outputs them with some HTML, all thru the ShortCode

[gallery]

.

So, you can basically do the same with Views, but you cannot pass the ID values of the above ShortCode to a View Query, so to get only those Images.

The WordPress ShortCode

[gallery]

simply does not allow to return ID's only, which is what would be needed to pass them to a View.

You would have to create a gallery with Toolset Views instead.

Relevant Documentation:
https://codex.wordpress.org/Gallery_Shortcode
https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/

This support ticket is created Il y a 6 années et 1 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 réponses, has 2 voix.

Last updated by Chris Il y a 6 années et 1 mois.

Assisted by: Beda.

Auteur
Publications
#618507

Tell us what you are trying to do?
If you go into posts > open a post > Add Media > Create Gallery you can make a gallery of images for a post. Is there anyway for Views to get this info so I could ouput the gallery within a custom <div> and then output each item as a unordered list somehow

Is there any documentation that you are following?
I could not find any. I found an old forum post but it did not seem to relate.

Is there a similar example that we can see?
I know how to make a gallery and I know I could manually make one with repeating image fields but I wanted to know if there was a way to do so using the built-in functionality as an alternative. I don't know when WP added this gallery functionality if its new or not but a client actually introduced me to it!

What is the link to your site?

#618623

No, those galleries are a WordPress features, which create Galleries all coded by WordPress core.

In Views, you can basically produce the same, by creating sliders.
https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/

WordPress simply takes a few attachment ID's (Media, which you can query in Views too), and outputs them with some HTML, all thru the ShortCode [gallery].
https://codex.wordpress.org/Gallery_Shortcode

So, you can basically do the same with Views, but you cannot pass the ID values of the above ShortCode to a View Query, so to get only those Images.

The WordPress ShortCode [gallery] simply does not allow to return ID's only, which is probably what would be needed to pass them to a View.

You would have to create a gallery with Toolset Views instead.

#618822

Thank you! I did not even know this Gallery thing existed, a client showed it to me when their gallery was not working. "This is how I was making the gallery." I said "Show me!" and then poof I learned this existed. 🙂 I was hoping now learning of its existence to be able to make some sort of fallback for this client but no biggy I will just have them use the images repeater fields I have added to the content entry.

Thank you for the help!
Cheers!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.