How to use filter to correctly analyse text field as H2 header with Yoast SEO
-
How to use this filter? I have custom field named “section-headline” (is text field but on website is H2) and paste this code to functions.php. And Doesn’t work. Yoast SEO not Analize this correctly as H2.
add_filter( ‘Yoast\WP\ACF\headlines’, function ( $headlines ) {
// value from 1-6, 1=h1, 6=h6
$headlines[‘section-headline’] = 2;
return $headlines;
});
- The topic ‘How to use filter to correctly analyse text field as H2 header with Yoast SEO’ is closed to new replies.