The problem I’m having is the keyword page analysis tool doesn’t read my custom fields so I am trying to figure out how to run a filter on them.
I found a blog post on Yoast website here here which references this issue and they list the filter wpseo_pre_analysis_post_content
, but I am unsure of how to run this on the fields.
I found an action for running a function on the admin edit screen on the ACF website : acf/input/admin_head, but I don’t know how to run the filter on the actions that have been loaded.
EDIT:
I found out the acf plugin actually has this filter built in but doesnt seem to be working.
// set value
if( !isset($field['value']) )
{
$field['value'] = apply_filters('acf/load_value', false, $post_id, $field);
$field['value'] = apply_filters('acf/format_value', $field['value'], $post_id, $field);
apply_filters( 'wpseo_pre_analysis_post_content', $field['value'] );
}