Custom Field – Meta Description
-
Hello,
I have been using this function to make the metafield description take the value of a custom field. However, this no longer works. Any help please?
add_filter( 'the_seo_framework_custom_field_description', function( $description, $args ) { if ( $description ) return $description; if ( function_exists( 'get_field' ) ) { // Pass ID for SEO bar compatibility. $excerpt = get_field( 'fl_description', $args['id'], false ) ?: ''; if ( $excerpt ) { $description = the_seo_framework()->trim_excerpt( $excerpt, mb_strlen( $excerpt ), 155 ); } } return $description; }, 10, 2 );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom Field – Meta Description’ is closed to new replies.