Support

Account

Home Forums ACF PRO Image field returns a string instead of an array Reply To: Image field returns a string instead of an array

  • I know these may sound like an obvious questions, but the code you have for displaying the images appears that it should be working.

    Is code is in “The Loop” of the search results page?

    Check to be sure that there is actually an attachment post with the post ID of 302 and that it is an image. This could cause the ID to be returned instead of the image array.

    Also, rather then if( !empty($image) ): you could do if (is_array($image)): This would be a better test.