Hi Martin,
You can use filter the_seo_framework_fetched_description_excerpt
, test for null === $args && is_author()
, and then return the value of get_field()
.
You still need to change ‘my_author_desc_field’ to something you added. e.g.:
add_filter( 'the_seo_framework_fetched_description_excerpt', function( $excerpt, $depr, $args ) {
if ( null === $args ) {
// In the loop
if ( is_author() ) {
$field = function_exists( 'get_field' ) ? get_field( 'my_author_desc_field', get_the_author_meta( 'ID' ) ) : '';
// AI-strip all its HTML and shortcodes. (Optional but neat if field accept raw input)
$field = $field ? tsf()->s_excerpt_raw( $field ) : '';
// Use $field if it has content, otherwise fall back to original excerpt.
$excerpt = $field ?: $excerpt;
}
}
return $excerpt;
}, 10, 3 );
I hope this helps! Cheers ??