Home › Forums › General Issues › Get image loaded › Reply To: Get image loaded
Thanks, i think im on the way, still not there, but almost.
The code looks like this for the moment:
foreach ( $posts as $post ) {
$post_back_id = the_field('back_image', $udt_project->ID);
$back_image_src=wp_get_attachment_image_src($post_back_id,'back-thumb');
$homepage_secs.='<div class="back-thumb-container"><div class="back-thumb"><img class="image" src="'.$back_image_src[0].'" /></div></div>';
}
but, in the website source code, it looks like this:
http://localhost/test/wp-content/uploads/2013/09/test.jpg
<div class="back-thumb-container">
<div class="back-thumb">
<img class="image" alt="123456789" src="">
</div>
</div>
I have found the path to the second image, but its not in between the src-tag.
Any ideas?
Thanks.
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.