You’ll need to do a check for
$row['description'] before actually echoing the
<p> tag – that’s why I placed
if( $row['description']) before
echo '<p class="description">.... This check will simply make sure that
$row['description'] is not empty.
If this doesn’t work for you, PHP can also check for empty values in a number of different ways:
And there’s a discussion of some implementations over at http://techtalk.virendrachandak.com/php-isset-vs-empty-vs-is_null/ !
Ah, and just for ease of reading: http://diffchecker.com/7za0xnhq 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.