ACF meta key field displays Array when field is of "relationship" type in post grid plugin wordpress


Staff member
In wordpress I have a custom post type (generated through the ACF plugin) of job offers which include several text fields (meta_key values) which the plugin "post grid pro" will display no problem. However, I have one field which is the agency that posted the job offer.

This is a <strong>relationship</strong> field and whenever I add this meta_key to the list of fields to display within each block of my grid it displays simply "Array".

I have tried creating my own shortcode to display this field but alas, this does not work.

There is a page in the site, written by one of the original developers, which lists the job offers. They have managed to display the title of the job agency in php with:

&lt;?= get_field("agence")[0]-&gt;post_title ?&gt;

I would like to be able to either write my own shortcode to display the agency title or somehow dynamically create a new meta_key for each job offer which contains automatically the name of the agency derived from the relationship field "agence".

Any help would be vastly appreciated.