Skip Navigation

[Resolved] custom field for media

This support ticket is created 4 years 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: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 4 years ago.

Assisted by: Jamal.

Author
Posts
#2071837

Tell us what you are trying to do?

Hi, using Toolset, how can I add custom fields to media?

I'm setting up a gallery on hidden link and would like to create a custom data structure to describe the works so they can be filtered, sorted, grouped, etc., based on custom fields. I have started doing this on post level (trying out ACF), but some posts feature galleries of series of images, e.g., hidden link and while all images here share most of the custom field values, some fields would have different values within the series, and I haven't found post type media or something to that effect in the 'visible' setting of ACF, which is why I'm looking to Toolset to maybe allow me to do this better.

Cheers & smiles, Kai.

??? would it be possible to get a trial license for trying this out on my new site before upgrading the account? (Can't use it on dharma.online as that site has a completely different scope and I don't want to mess with that.)

What is the link to your site?
hidden link
specifically I have already added custom fields and am displaying one of them at the bottom of the page (Opus #):
hidden link

#2071905

Hello Kai and thank you for contacting Toolset support.

Indeed, you can add custom fields to the Media post type using Toolset. Check this screenshot, I added a single line field to media and I can update its value in a media post from the backend. hidden link
You can open the media edit screen from the Media Library when viewing the Media file. Check this screenshot hidden link

Keep in mind that a Toolset image field stores the URL of the Image instead of its ID. And that a content template displays, at any time, anywhere, only ONE post. We can call it the context of the content template. You can pass it to the content template using the item attribute.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/

This means, that inside a content template to display a post, you can display that post custom fields. If you need to display custom fields from an image field on that post, you will need custom code to get the ID of the image, then you can pass it to a separate content template that will display the image fields. Check the custom code on this reply for inspiration https://toolset.com/forums/topic/alt-text-output-for-images-from-custom-field/#post-1857657

Regarding the license request, I don't think that would be possible, especially because we offer a 30-days “no questions asked” refund policy.