it would be great to set dynamically a custom field based on the value of a custom field of another CPT. Is it possible somehow?
To be clear, I have a CPT ‘Dishes’ that contains dishes served in Restaurants.
Restaurants is also a CPT, it contains many restaurants. I link the two through a Post Object Custom Field (in Dishes, I set the Restaurant where the dish is served).
Then, I set the address of the Restaurant in a custom field of the Restaurants CPT.
Is it possible to retrieve the address from that Restaurants’ custom field and set it as value for a custom field in Dishes CPT?
That’s because I would like to show the address also in the Dishes (and not only in the Restaurant).