The artwork_image field is an Image field set to return the Image URL.
I have the field assigned to a custom post type.
I’m not sure what “sub fields” and “repeater field” mean.
I’m using a plugin called Slider PRO to render the slider. It allows for custom fields to be used to generate content in the slider (images, captions, etc) and my Text fields work for the captions (see “media” and “artist”) but the Image field only returns the Image ID, never the URL.
I accidentally placed the var_dump outside the loop, but I have since corrected that and still get bool(false).
I am using a plugin called Slider PRO to render the slider.
The other two ACF fields I have (Medium and Artist) work fine.
I have the following code in my page.php file and it only returns “bool(false)”.
<?php var_dump(get_field('artwork_image')) ?>
I decided to create a child theme so I could inject the PHP directly into the page without having to rely on a plugin. As you can see on the page linked below, the same “bool(false)” happens with the code you provided in the page.php file of the theme.
http://colbyblogs.org/wptest/custom-post-types/
Any idea why this would happen?
I’ve tried all three, but it is currently Image URL.
I’m not sure what I’m doing wrong: http://colbyblogs.org/wptest/custom-post-types/shortcode/
On this page I’m using a plugin called CSS & Javascript Toolbox to inject PHP code on my page, if you look at the source code the img tag isn’t working right with the code I took from your help pages:
<img src="<?php the_field('field_name'); ?>" alt="" />
I’m trying to use the return value in a plugin called Slider PRO, you can see my setup here: http://colbyblogs.org/wptest/custom-post-types/
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.