Home Forums WoodMart support forum MICRODATI META

MICRODATI META

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #586708

    serviziweb
    Participant

    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.
    #587003

    Hung Pham
    Participant

    Hi serviziweb,

    Thanks for reaching to us and appreciate your patience.

    For specialized assistance and potential solutions, I kindly suggest that you reach out directly to the author plugin’s support team, who are better equipped to provide you with the guidance you requires.

    If you have any questions please feel free to contact us.

    Regards,

Viewing 2 posts - 1 through 2 (of 2 total)