Home › Forums › Front-end Issues › Display all fields type (Array to string conversion problem) › Reply To: Display all fields type (Array to string conversion problem)
unless every field in an image field then you’ll need to check the type of each field and proceed accordingly to use the correct method to show what you’re looking for.
Not all fields will have $field[‘value’][‘url’]
and print $field[‘value’][‘sizes’] is an array, not really sure about print $field[‘value’][‘0’];
If you just trying to see what’s in them try print_r()
like your commented out code at the top.
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.