Hello,
I am looking to insert a shortcode image in an article. But that does not work.
<li><a href="[acf field="site_internet"]">Site internet</a></li>
<li><img src="[acf field="logo_du_partenaire"]" alt="logo du partenaire" /></li>
Do you know how to do it? thank you
Hi @silencesim
Please keep in mind that the shortcode will only work for a simple value like text. So, if you want to use the image field in the shortcode, you need to set the image field Return Value option to “Image URL”. I’ve attached a screenshot for your reference.
If you need to use the Image Array, then kindly check this page: https://www.advancedcustomfields.com/resources/image/
I hope this helps 🙂
Hello James,
Thank you for your answer. That’s what I did. But the page does not display the url. but this :
<li><a href="[acf field=">Site internet</a></li>
<li><img src="[acf field=" alt="logo du partenaire"></li>
The acf field is “translated” by wordpress and does not display correctly
Hi @silencesim
In this case, could you please use single quotes around the field name like the following?
<li><a href="[acf field='site_internet']">Site internet</a></li>
<li><img src="[acf field='logo_du_partenaire']" alt="logo du partenaire" /></li>
I hope this helps 🙂