Home › Forums › General Issues › Layout breaks if field not entered › Reply To: Layout breaks if field not entered
Thank you very much, John. Much appreciated. That works perfectly.
On another quick note (if you don’t mind). I’m also trying to display the filename instead of the ‘Download Report’ text, however, the method below is showing the full URL path. Any ideas?
<?php if( get_field('linkdownload') ) { ?>
<a class="news-download" target="_blank" href="<?php the_field('linkdownload'); ?>" >Download File: <?php the_field('linkdownload'); ?></a><br>
<?php } ?>
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.