Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

all3dp/yoast-seo-acf-content-analysis

 
 

Repository files navigation

ACF Content Analysis for Yoast SEO

This plugin ensures that Yoast SEO analysize all ACF content including FlexiContent and Repeaters

Filters

ysacf_exclude_fields: exclude acf fields from Yoast scoring.

Example: exclude text-color field from Yoast scoring.

add_filter('ysacf_exclude_fields', function($fields){
    return array_merge($fields, array(
        'text_color'
    ));
}, 10);

ysacf_field_overwrite: Modify a specific field value.

Example: Modify a specific field value

add_filter('ysacf_field_overwrite', function($field_key, $field_value, $postID) {

    $data = get_field($field_key, $postID);
    
    if($data > 10) {
        $field_value = $data * 10;
    }

    return $field_value;

}, 10);

ysacf_finalize: filters the data.

Example: Append extra data to the final output that is send back to Yoast SEO.

add_filter('ysacf_finalize', function($data, $postID){
    
    $data .= 'Modify the final output e.g. append extra data or logic';
    
    return $data;
}, 10);

About

WordPress plugin for scoring ACF content in Yoast SEO

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • PHP 80.3%
  • JavaScript 19.7%