Types plugin provides a fields API, making it easy to display custom fields on your website’s front-end. The corresponding function call outputs the desired fields with a special formatting and supports different attributes for each field type.
Problem: I have two custom post types connected in a Toolset post relationship. On one of the post templates, I am displaying a form created by Gravity Forms. I would like to set the default value of a field using the value of a Types field from the related post.
Solution: It may be possible to set the value of a custom field from a related post using a Types field shortcode and Gravity Forms dynamic field values and the Gravity Forms shortcode with dynamic attributes.
Problem: I have imported a site using FG Drupal to WordPress. Now when I try to display a custom field using a Types field shortcode, I see a fatal error:
Fatal error: Uncaught Error: Call to a member function get_value_filtered() on null in /path/to/site/wp-content/plugins/types/application/models/field/type/checkbox/view/frontend.php:33
Solution: Resave the field group containing this custom field, clear the Views cache, clear the Kinsta cache.
Problem:
The user would like to build a theme template and include the Types field on it.
Solution:
Toolset does not act or allow to modify theme's templates. Toolset acts only on the return of the the_content() function.
We can create a Toolset Content Template for your custom post types or for specific posts. But the resulting HTML will only replace the_content() function from the theme's template.
Relevant Documentation:
For more information on how to customize Toolset based website using PHP, check the articles on this documentation page.