I was trying to add this code using “Code Snippets” plugin but it didn’t work, can one of the developers help?
add_filter( 'wordpress-seo/src/generators/schema/howto', function( $data, $block ) {
$data['howto']['supply'] = 'Paper';
$data['howto']['tool'] = 'Pencil';
return $data;
}, 11, 2 );
-
This reply was modified 3 years, 10 months ago by
creosmart.
Hello Creosmart,
Thanks for reaching out regarding the HowTo schema.
I assume you received this warning Missing field tool and supply
The fields “tool” and “supply” are not currently available in the Yoast SEO plugin. Since these are optional and not required, the warnings you see are not errors and will not cause any issues. However, we understand that it would be useful to have these fields available.
You are not the first to have requested this feature, so a feature request has already been created. It is currently under review by our product team.
@maybellyne
Thank you for getting back to me.
I did see it on the feature requests (since 3 years ago) but was hoping that in the mean time one of the developers could provide the code to add it manually. I thought it’s couple of code lines using the Schema API but maybe I’m mistaken.