Get link picker custom field to show only if field exists
You’re testing if assigning a value to $mylink was successful in the if statement rather than testing if it’s empty. Try something like: <?php $article_link = get_field(‘article_link’); if( $article_link[‘url’] ): ?> <a href=”https://wordpress.stackexchange.com/questions/246505/<?php echo $article_link[“url’]; ?>”><?php echo $article_link[‘title’]; ?></a> <?php endif; ?> See Example 1 in the ACF docs.