I’m having a little trouble getting the User field to display the image, everything else is working perfectly well and it’s even pulling through the url when i check in the inspector however when i hover over the url i get a popup saying ‘could not load the image’.
Since everything else it working I’m thinking this might be a gravatar or possibly a browser issue.
This looks like a repeater, are you using the user ID in the if and while part of the repeater call?
Is the field set to return an array or URL?
But I think the issue is this: <img src="<?php echo esc_attr($nomInfo['user_avatar']); ?>" alt="author-avatar" />
Should be this: <img src="<?php echo esc_url($nomInfo['url']); ?>" alt="<?php echo esc_attr($nomInfo['alt']); ?>" />
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users