php - ACF file download not working, added screenshots -


i trying use acf add files able download. , using following code:

<?php if( get_field('jesmond_breakfast') ):?>   <a href="<?php the_field('jesmond_breakfast'); ?>" target="_blank"><strong>brochure</strong></a> <?php endif;?> 

then have set in acf.

enter image description here enter image description here

but reason, having no luck.

can see issue?

 <?php if( get_field('jesmond_breakfast') ):?>   <a href="<?php the_field('jesmond_breakfast'); ?>" target="_blank"><strong>brochure</strong></a> <?php endif;?> 

instead of can store in variable after given in

<?php if( get_field('jesmond_breakfast') ):  $link= the_field('jesmond_breakfast');?>           <a href="<?php echo $link;  ?>" target="_blank"><strong>brochure</strong></a>         <?php         endif;?> 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -