We need to make a nice-looking photo gallery function to embed into custom posts. We need to let users upload multiple photos at once and add both a caption and photo credit for each. Instead of using the default WordPress image upload / media library, can we customize it with Toolset? And is there a way to add fields where someone can put "photo credit" and "caption", which would display when a user clicks on the live side to enlarge a photo?
Hello and thank you for contacting the Toolset support.
It is worth mentioning that you can use the native WordPress Media Manager in a Toolset form, you just need to activate it, check this screenshot versteckter Link
Using the native Media Manager, you can upload images and add captions, descriptions, or alt texts.
If on the other hand, you don't want to use it, I think that you will have to implement some custom code for adding generic fields to the form, and some custom code to save captions, description, and alt texts programmatically for the images, then save the images in the post's image custom field. Does it make sense?
So with Toolset, I can't make a simple-to-use photo upload for a membership site? I need it to be very easy to use (easier than the WP Media Manager), and a bit customizable. Like any membership site, users need to be able to upload a main image (headshot) and upload other image into a gallery. We need this for both the members profiles, and for when the members create custom posts.
If this isn't available in Toolset, then please add it in an upcoming update, as this is essential for many types of websites.
In the meantime, can you recommend a popular / well-updated plugin which we could integrate into a Toolset form to add these photo upload and gallery functions?
Thanks
I don't say that you can't make a simple-to-use photo upload for a membership site. It's just that what you are trying to build is not that simple according to the following requirements I understood from your first message:
- upload multiple photos at once and add both a caption and photo credit for each.
- put "photo credit" and "caption", which would display when a user clicks on the live side to enlarge a photo
Why? For several reasons:
- Media files in WordPress are a special custom post type.
- The built-in Toolset slider expects to pull an image from a repeatable field, which will enforce us to enter the caption and credit from the native Media library.
- Toolset Forms are meant to create or edit ONE post at a time. Consider that each image is actually a separate post, we can perform the upload but it is not possible to add the caption and credit fields.
Toolset is a powerful set of tools. You can build almost anything you imagine using Toolset and sometimes some additional custom code.
I can suggest how to build the data model, but there is currently no way to display the information of each image when the image is opened in the lightbox.
If you are comfortable with some Javascript and you can use a 3rd party Javascript library to display the images in an open window with their information, I can help you through how to store this information using Toolset and how to generate them on the frontend, then, this 3rd party library will display each image information when the image is clicked/opened.
On the other hand, if you don't need to open images in a lightbox or a popup, all of the requirements you said can be easily implemented. The featured image or an image field can be used as the headshot image. A repeatable field group can be used for the additional images of the gallery.
In the meantime, I invite you to check these tutorials:
- versteckter Link
- https://toolset.com/course-lesson/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields/
My issue is resolved now. Thank you!