Output a "advanced-custom-fields"-field programmatically in wordpress backend -
Output a "advanced-custom-fields"-field programmatically in wordpress backend -
i created custom field "advanced-custom-fields"-plugin. want , output custom field programmatically in template file (backend, edit page), because template called via ajax if user want's add together new part page.
is there function returns finish field? found functions gave me values, not field "form".
i found solution. duplicated plugin folder theme root directory , set next code functions.php:
function relationshipfield() { $newfield = new acf_field_relationship(); $field = array( 'post_type' => array('post'), 'max' => '', 'taxonomy' => array('all'), 'filters' => array('search'), 'result_elements' => array('post_title', 'post_type'), 'return_format' => 'object' ); homecoming $newfield->create_field($field); }
in add-on append custom input field (created in function.php) stores post id's in database.
wordpress advanced-custom-fields
Comments
Post a Comment