Support

Account

Home Forums Front-end Issues Relationship returns array of string instead of post object Reply To: Relationship returns array of string instead of post object

  • This is because you are using get_post_meta() instead of get_field() https://www.advancedcustomfields.com/resources/get_field/

    ACF only stores the post IDs of the posts in a relationship field. These IDs are stored as strings. When you use get_post_meta() you can only get what ACF stores. If you want ACF to do the work of getting the post objects then you need to use the ACF functions.