Has anyone found a solution to getting Yoast SEO to include ACF fields within the SEO analysis, etc.? I want to make it so Yoast SEO pulls in a text field from one of the layouts in my ACF Flexible Layout field and can’t find any way to get it to work.
It looks like there used to be some ways to make it work using some custom functions and/or plugins but they have all since been depreciated or the plugins no longer work.
For example I kept finding this plugin:
However, it no longer works with the latest version of WP, Yoast SEO, and ACF Pro.
So I am wondering if anyone else has been able to solve this? I am sure I’m not the only one who needs Yoast SEO to pull in content from ACF fields rather than the_content() for it’s descriptions.
I did just notice that it does actually work if it is a field that is not within a Flexible Content field type. So if you just have a text field named “seo_description” on the page and you want to use that as the description within Yoast SEO, then you can do the below within the Yoast SEO “search appearance” settings in the description area:
So I guess the temporary solution is to do something like this, however this means I need to create another field for someone to enter in the specific seo description text. So if there was some way to make this just automatically pull from the current text area field I have within the Flexible Content layout I have, that would be great!
I am guessing the %%cf_field_name%% approach doesn’t work for sub fields like the ones within repeaters, groups, flexible content, etc.
Yoast has become a poor choice for SEO combined with ACF (https://github.com/Yoast/wordpress-seo/issues/17178#issuecomment-986034965) That is unless you are using guberbug and ACF blocks.
The filters listed here still appear in the current version of the plugin http://hookr.io/plugins/yoast-seo/17.8/filters/#index=a
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
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.