[ad_1]
Hello,
So i want to hide a section if an acf field is empty (it’s an image), i found the ‘get\_field’ function but i think my implementation is wrong.
Here is what i’ve tried:
<?php
$value = get_field(“field_650b217a72c41”);
if ( $value ){
echo $value;
} else {
echo “<div id=\”product-cat-banner\” style=\”display:none;\”>\n”;
}
?>
Does anyone have an idea how to fix it?
(I am using elementor pro and hello elementor as a theme)
Thank you in advance!
[ad_2]