ACF and Yoast SEO

ACF and Yoast SEO integration

There are two plugins that we most likely install on every single WordPress installation:

  1. ACF Pro (Repeater and Flexicontent are killer!)
  2. Yoast SEO Plugin

While ACF is great for creating new content blocks, it never gets counted by Yoast’s SEO plugin for its “focus keywords” analysis.  This happens to be a pretty sore point for a lot of people.  Until now!

The Solution

Yoast has specifically made a hook for this issue called “wpseo_pre_analysis_post_content” https://yoast.com/wordpress-seo-content-analysis/ This allows us to modify what content is being filtered through the content analysis system. We created a function that recursively adds content from ACF to the analysis.  This means that our plugin works with ACF’s Repeater Fields and Flexible Content Fields too.   You can checkout the plugin here: ACF and Yoast SEO Content Analysis

A (Small) Caveat

So, Yoast wanted the system to be relatively responsive.  This meant that when they wrote the plugin to do analysis for the “content” on the front-end, they just ended up counting the number of times the keyword repeats itself in the normal “content” field (using jQuery).   Since we don’t have a good way to override that front-end function, we cannot change the behavior of the first “General” tab and the way it counts the focus keyword in the “Content”. That said, if you update the page after adding keywords in any ACF field, the keyword count in the second “Page Analysis” tab should increase. While on the topic of SEO and content, let us know if you’re looking for content strategy help.  We’ve grown our site’s traffic from less than 1000 visits/month to 20K visits/month with an awesome strategy! high traffic Contact us now!