• Resolved recetteitalienne

    (@recetteitalienne)


    Hi
    I have activated yasr plugin and realised that it adds unwanted structured data on my recipe page, I end up with duplicated structured data on my recipe pages.
    I would like to remove them and keep only the star rating feature and agregagtingratings

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor dudo

    (@dudo)

    Hello!

    The problem is that you can’t have aggregateRating outside an itemType, that in your case is recipe.

    You can disable all structured data provided by YASR (but also aggregateRatings!) with these lines that you need to add into your function.php child theme:

    global $yasr_public_filters;
    remove_filter('the_content', array($yasr_public_filters, 'addSchema'));

    Best,
    Dario

    Thread Starter recetteitalienne

    (@recetteitalienne)

    Hi

    is there any other way to juste keep only the aggregateRatings ?

    Plugin Contributor dudo

    (@dudo)

    Hello,

    This is not possibile, it must be inside an itemType (you can find more info here https://developers.google.com/search/docs/data-types/review-snippet )

    The easiest way (if possible) is to disable your existing recipe and leave only YASR enabled.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unwanted structured data’ is closed to new replies.