Home › Forums › Front-end Issues › Field output not showing › Reply To: Field output not showing
Okay so you should use the following:
<?php
$download = get_field('download');
if( $download ): ?>
<a class="button" href="<?php echo esc_url( $download ); ?>">Download File</a>
<?php endif; ?>
This would go in the php template file with the other content for the page you wish to add it to.
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.