Hello,
For the integration with fb, fb tall me that there aren’t some microdati.
Do you saggest someone?
The suggestion is
modify file functions.php
whit this code
add_filter( ‘wpseo_schema_graph_pieces’, ‘add_product_id_to_yoast_schema’, 10, 2 );
function add_product_id_to_yoast_schema( $pieces, $context ) {
if ( ‘product’ === $context->type ) {
foreach ( $pieces as $piece ) {
if ( $piece instanceof Yoast\WP\SEO\Generators\Schema\Thing ) {
$product_id = get_the_ID(); // Ottieni l’ID del prodotto corrente
$piece->schema[‘productID’] = $product_id;
}
}
}
return $pieces;
}
is correct?
Attachments:
You must be
logged in to view attached files.