Last active
August 29, 2015 14:03
-
-
Save yratof/d7481225301b6fe8be6e to your computer and use it in GitHub Desktop.
Get Barley and Custom Fields with Types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Using a custom field called wpcf-home-heading created by types. | |
| // The entered value of this is: Plastic Cards to get you noticed | |
| <?php | |
| $field = types_render_field("home-heading", array()); | |
| if ( function_exists( 'barley_wrapper' )) { | |
| echo barley_wrapper('wp_custom_field' , $field, ($field)); | |
| } else { | |
| echo $field; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment