-
Notifications
You must be signed in to change notification settings - Fork 5
get_aeria_field
Alberto Parziale edited this page Aug 30, 2019
·
1 revision
The method fetches a metabox field for a specific post. While, for single fields, you may use WP's get_post_meta, this method gets really useful when you're looing for multiple fields, like a section or a select field.
-
$post- WP post object - Searched field's post. -
$metabox- string - Searched field's metabox ID. -
$id- string - Searched field's ID.
The returned value is the field's value; in case of multiple fields, the returned value is an array containing their children.
function getField ()
{
$meta = get_aeria_field(get_post(), "metabox1", "input-text");
return $metas;
}
add_action('aeria_booted', 'getField');