Hi there,
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
Thanks.
Hey Kyle,
Instead of using
the_field(“news_origin”);
try using:
get_field("news_origin");
Hope it helps.
Best regards,
Nikko
Hi Nikko,
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>";
Cheers
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon