Reputation: 749
I'm trying to retrieve the value from a Custom field as below. It doesn't seem to get any value. Please point out the mistakes in it.
<?php
$gift_text_lines = get_sub_field( 'gift_text_lines' );
if ($gift_text_lines > 1) { ?>
.fluentform .ff-el-image-holder {
min-height: 264px;
margin-bottom: 5px;
}
<?php
}
?>
Custom fields are as seen in the image below.
Upvotes: 0
Views: 421
Reputation: 595
Can you try get_field if get_sub_field not work for you.
if(in_array('hide_footer_signup_for', get_sub_field('gift_text_lines')))
{
echo 'some html';
}
Upvotes: 1
Reputation: 595
You can try out :
$gift_text_lines = get_field( 'gift_text_lines' );
Upvotes: 1