Skip Navigation

[Resolved] Show custom field value in Divi Theme Builder template

This support ticket is created 2 years, 1 month 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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 2 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2508047

I've made a custom post type with 1 field. I want to show the value from that field (which is a file / URL) in a Divi theme builder template for another custom post type.

Apparently, Divi can't seem to do that, so I created a content template in Toolset (just a button with the dynamic URL), which I would like to insert in my Divi template.

How do I do that? Can I use a shortcode, and if yes, which one? Or is it possible to show the value in Divi another way?

#2509433

Hi,

Thank you for contacting us and I'd be happy to assist.

To show values from Toolset Types custom fields, you can use the Types Fields API shortcode, as explained at:
https://toolset.com/documentation/customizing-sites-using-php/functions/#file

For example, to show value from the field with slug 'file-field' from the current post:


[types field="file-field"][/types]

And to get the value from the same field, but from some other post with ID '1234', you can use the 'item' attribute:
( ref: https://toolset.com/documentation/user-guides/views-shortcodes/item-attribute/ )


[types field="file-field" item="1234"][/types]

Note: In Divi builder, you can use this shortcode in any widget that supports shortcodes.

I hope this helps and please let me know if you need any further assistance with this.

regards,
Waqar