Home › Forums › General Issues › Getting the alt text instead of the image title › Reply To: Getting the alt text instead of the image title
Problem solved.. 🙂
The variable $image_one doesn’t return the image ID anymore it should be get_field( ‘field_name’ ).
Like this:
$slide_one = '<li><img src="'. $image_one[0] .'" alt="'. get_post_meta( get_field('slide_image_one') ,'_wp_attachment_image_alt', true ) .'" /></li>';
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.