I encounter a problem and I try many things to solve it on my own but I don’t find the solution. Hope one of you will be able to help me.
I used the latest version of Yoast SEO, the famous SEO plugin on WordPress and it is really easy to integrate your own ACF fields in your page Title or in the Meta Description model with : %%cf_your_ACF_Field_Name%%
My only problem today is for the Relationship field I have on my website. It’s impossible to have the value I want from this type of field in my meta Title configured with Yoast.
The value of the field is always “Array”. I guess this field return an array, but what is the solution to go inside it, to return the value of the array. To be precise, I have only one information in this Relationship field (it’s only to make a link between an artist and his/her exhibition, so each exhibition has only one artist).
Hope I am clear, it’s hard to explain a problem like that in writing. Moreover English is not my native tongue.
Thank you in advance for your help! It means a lot for me.
PS : Don’t hesitate to ask me if you want more informations.
ACF saves the relationship as a serialized array of the post IDs in the database. That’s why you get an “array” text. In this case, could you please ask Yoast SEO support if they have a hook to modify the Title and the Meta Description? That way you can use the code example on this page to modify them: https://www.advancedcustomfields.com/resources/relationship/.
I hope this helps 🙂
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users