Can you guys help me on this? i’m stuck.
I installed the ACL ( advanced custom fields) plugin and created a custom field “news_origin” and want to add to the postslider.php just after the excerpt.
i added this piece of code:
$output .= “<img src=’ “;
$image = the_field(“news_origin”);
$output .= $image[‘url’];
$output .= ” ‘ alt=’ ‘ />”;
but the result is
Is not applying the image url.
Can you help
Instead of using
Hope it helps.
After a great search, i found this on a old post in the enfold forum. And it worked. So i just add it here if someone needs it also.
$output .= "<div class='news_origin_image'><img src='"; $output .= get_field('news_origin', $entry->ID); $output .= "'></div>";
The topic ‘advanced custom fields and the image url’ is closed to new replies.