acf get field
$value = get_field( "text_field" );
if( $value ) {
echo $value;
} else {
echo 'empty';
}
acf get field
$value = get_field( "text_field" );
if( $value ) {
echo $value;
} else {
echo 'empty';
}
acf get field
get_field($selector, [$post_id], [$format_value]);
/*
$selector (string) (Required) The field name or field key.
$post_id (mixed) (Optional) The post ID where the value is saved. Defaults to the current post.
$format_value (bool) (Optional) Whether to apply formatting logic. Defaults to true.
*/
// Get a value from the current post
$value = get_field( "text_field" );
// Get a value from a specific post
$value = get_field( "field_name", $post_id );
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us