Home › Forums › Add-ons › Flexible Content Field › Yoast SEO & ACF › Reply To: Yoast SEO & ACF
I just combined two or more fields into 1, and that worked!
So you have to write something like this:
add_filter( 'wpseo_pre_analysis_post_content', 'filter_yoasts_wpse_119879', 10, 2 );
function filter_yoasts_wpse_119879( $content, $post )
{
$field1 = get_field( 'text', $post->ID );
$field2 = get_field( 'more_text', $post->ID );
$fields = $field1 . ' ' . $field2;
return $content . $fields;
}
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.