Home Forums General Issues Retrieving image url through relationship Reply To: Retrieving image url through relationship

  • I learn something new every day. I wanted to be sure I was not going crazy. This is something that I did not know until today. The WP_Post class has a magic __get() method that will return unknown properties.

    However, in this case it is only returning the value for the image field that is stored in the database as a string. This bypasses the ACF by using get_post_meta() and this is why you are getting a string ID value instead of the value you expect.

    Thank you for the enlightening topic. I like learning new things even after doing this for so many years.