Support

Account

Home Forums General Issues Relationship field returning ID, how to return the correct values. Reply To: Relationship field returning ID, how to return the correct values.

  • first, sorry for not answering sooner but when you answer your own post it gets removed from the awaiting reply list.

    Anyway

    I think you were closer on you first attempt. The problem was that you were not supplying the correct post ID for get_the_title.

    If you are returning an array of IDs from your relationship field then you should use $studiotitle = get_the_title($studio);

    If you’re returning post object from acf then you should use $studiotitle = get_the_title($studio->ID);