• zapaaron

    (@zapaaron)


    Can verify that ACF Content Analysis for Yoast SEO plugin works on WordPress 5.7 for direct relationships (Page to Page Fields) but for those more involved content types such as a taxonomy relationship to another post type, those fields do not appear to be counted.

    Realizing the complexity of the situation, I did try two different methods aside from this plugin, neither of which worked.

    They are:
    1. Add the custom fields as a comma-delimited list to Yoast settings as described here on the Yoast site: https://yoast.com/help/add-custom-fields-to-yoast-seo-premium-plugin-settings/
    >> I wasn’t sure how to denote field groups, repeaters and so. Maybe the problem is there. Applied it to Posts, Pages, Custom Post Types…didn’t affect the count.

    2. Add a hook in functions to force Yoast to use custom fields manually. Something like this for a repeater:
    function sp_content_analysis_content($content, $id) {
    $sub_field_1 = ”;
    $sub_field_2 = ”;

    if( have_rows(‘content_row’, $id) ):

    while( have_rows(‘content_row’, $id) ) : the_row();

    // Load sub field values, note the space at the end of each subfield value
    $sub_field_1 .= get_sub_field(‘title’).’ ‘;
    $sub_field_2 .= get_sub_field(‘content’).’ ‘;

    endwhile;
    endif;

    //Add our data to content analysis
    $content = $content.$sub_field_1.$sub_field_2;
    return $content;
    }
    add_filter(‘seopress_content_analysis_content’, ‘sp_content_analysis_content’, 10, 2);`

    Does anyone have any feedback on a workaround?

  • The topic ‘Some but not all ACF Fields being considered in content analysis’ is closed to new replies.