I have set up a page link custom field on my posts. This is not required for all posts and I have allowed ‘null’ values.
If this is the code to display page link fields:
<a href="<?php the_field('page_link'); ?>">Read this!</a>
What would the if statement be so that it doesn’t display anything if the field is null?
<?php if( get_field('page_link') ): ?>
<a href="<?php the_field('page_link'); ?>">Read this!</a>
<?php endif; ?>