Hello,
I am trying to show a text if field is empty then show a custom text.
<?php
if(get_field('last_date'))
{
echo 'Sep 28, 2017';
}
?>
I try this but its not working. How I can fix this issue…
I fixed it..
<?php if ( get_field( 'field_name' ) ): ?>
FIELD CODE....
<?php else: // field_name returned false ?>
OTHER CONTENT IF FIELD IS EMPTY
<?php endif; // end of if field_name logic ?>