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

    (@dudo)

    Hello, you can simply add this line to your functions.php file:

    remove_filter(‘the_content’, ‘yasr_add_schema’);

    Best,
    Dario

    Thread Starter Webinane

    (@webinane)

    Hello,

    Thank You for the reply, i added it but now markup tool is not displaying the ratings too. I want to display the AggregateRating but not the Recipe schema.

    Thanks,

    Plugin Contributor dudo

    (@dudo)

    Sorry, you’re right 🙂

    There is a solution by doing a simply edit on the yasr code, but you’ll need to this everytime you update the plugin.

    Is it ok?

    Thread Starter Webinane

    (@webinane)

    Hmmm okay, do let me know, i will save that and will apply again after updating the plugin.

    Thanks,

    Plugin Contributor dudo

    (@dudo)

    In the plugin dir, open file lib/yasr-functions.php and on line 363 change this

    $title = "<span itemprop=\"itemReviewed\" itemscope itemtype=\"http://schema.org/Recipe\">  <span itemprop=\"name\"> ". get_the_title() ." </span></span>";

    with this

    $title = "<span>" . get_the_title() ." </span>";
    Thread Starter Webinane

    (@webinane)

    Replaced, but still having the same issue http://prntscr.com/9zaulr

    Plugin Contributor dudo

    (@dudo)

    sorry, don’t know why I was guessing you were using ReviewRating instead of aggregate…

    Ok, open same file and on line 427 change this

    $div_1 = "<div class=\"yasr_schema\" itemscope itemtype=\"http://schema.org/Recipe\"> <span itemprop=\"name\"> ". get_the_title() ." </span>";

    with this

    $div_1 = "<div class=\"yasr_schema\"> <span> ". get_the_title() ." </span>";

    Thread Starter Webinane

    (@webinane)

    Thank you, it works 🙂

    Thread Starter Webinane

    (@webinane)

    Hello again,

    Is the files changed ?? As i updated the plugin and now not being able to find the code on the mentioned lines 🙁

    Do guide me 🙂

    Thanks,

    Plugin Contributor dudo

    (@dudo)

    Hello, yep, the file is changed because Yasr doesn’t use microdata anymore but just json-ld 🙂

    Same file, line 375, change this:

    $rich_snippet["@type"]="Recipe";

    with this

    //$rich_snippet["@type"]="Recipe";

    Should be enough.

    Best,
    Dario

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to remove schema ?’ is closed to new replies.