Types Fields API

This page is part of the documentation about customizing your site using PHP.   To insert Types fields using PHP code, use the following syntax:

 <!--?php echo(types_render_field( 'field-slug', array( 'arg1' => 'val1', 'arg2' => 'val2' ) )); ?--> 

When using the Types API functions, like types_render_field in this example, you use the normal slug for custom fields. For example, if you have a custom field called „House Price“ with a slug house-price, use that slug with the Types API. However, when you are accessing custom fields through native WordPress functions, you need to prepend the wpcf- prefix to the slug. Continuing from the above example, for native WordPress function to access the „House Price“ field, you need to use the wpcf-house-price slug.

No items found
No items found