Home › Forums › ACF PRO › Image Field Shortcode As Data-Image-Src › Reply To: Image Field Shortcode As Data-Image-Src
If this is in a template file then you need to use get_field() and not a shortcode. ACF shortcodes only work on simple text fields.
Unless I’m missing something. Is there some reason that you need to use a shortcode? Is this code not in a template?
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.