Home Forums General Issues Retrieve data from relationship


Retrieve data from relationship

  • Hi there !

    I’m working on a website and I created two field groups called ‘Clients’ and ‘Reviews clients’.

    So I set a relation between ‘Clients and Reviews’ :


    • Client 1
    • Client 2

    Reviews Clients

    • Review 1 (client 1 has a relationship to that field)
    • Review 2 (client 2 has a relationship to that field)

    What I want is when I retrieve the reviews values, I want to display both Reviews and Client values (one client is related to one review)

    So if I want to display all value from Review 1 I do this in PHP :

    $field = get_field_object('review_client');

    It displays values from review but not values from the client who is related to.

    Thanks for your help !

  • Hi @pixelwarrior05

    Could you please share the JSON or XML export file of the field groups so I can test it out on my end?

    If you are using the relationship field, please check this documentation first:

    Thanks 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Retrieve data from relationship’ is closed to new replies.