• Resolved ranone

    (@ranone)


    Congratulations for the plugin! πŸ™‚

    I’m testing it in all its functions…

    I was wondering if there is the possibility to insert an identifier (@id) property on the structured data in order to identify the Recipe data and maybe insert other values in it …

    Example:

    <script type="application/ld+json">
    {
     "@context":"http://schema.org/",
     "@type":"Recipe",
     [...] 
    
     "@id": "https://domain.com/path/to/post/#recipe",
    
     [...]
    }
    </script>

    Thank a lot

    • This topic was modified 7 years, 1 month ago by ranone.
    • This topic was modified 7 years, 1 month ago by ranone.
    • This topic was modified 7 years, 1 month ago by ranone.
    • This topic was modified 7 years, 1 month ago by ranone.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi there,

    You can use the wprm_recipe_metadata plugin hook to alter the output of the metadata:
    https://help.bootstrapped.ventures/article/129-plugin-hooks-and-filters

    Basically something like this should work:

    function wprm_alter_metadata( $metadata ) {
        // Add something to the $metadata array here.
        return $metadata;
    }
    add_filter( 'wprm_recipe_metadata', 'wprm_alter_metadata' );
    Thread Starter ranone

    (@ranone)

    Thanks @brechtvds!

    I’ve added the below code to connect other metadata to the same item..

    $metadata['@id'] = get_permalink() . '#Recipe';

    Bye πŸ™‚

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

The topic ‘Structure data identifier (@id)’ is closed to new replies.