Skip Navigation

[Resolved] Add custom field to twig

This support ticket is created 2 years, 3 months 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.

This topic contains 1 reply, has 2 voices.

Last updated by Christopher Amirian 2 years, 3 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2468091

I use elementor with Unlimited Elements which used Twig.

I need to display a custom field to to twig.

How can i display my custom field inside twig

#2468909

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

There are no Twig templates in Toolset. You need to code the Twig templates yourself.

The process is that you will install a plugin such as Timber to be able to create PHP templates for Twig:

https://wordpress.org/plugins/timber-library/

Then you should use Toolset APIs and shortcodes to populate the custom fields to the Timber PHP templates, which then will be available for you in Twig:

https://toolset.com/documentation/programmer-reference/views-api/#render_view

https://toolset.com/documentation/customizing-sites-using-php/

As this will be code customization you might need a developer to implement such a feature. Here is a list of developers to hire for your reference:

https://toolset.com/contractors/

Thank you.