WordPress.org

Ready to get started?Download WordPress

Forums

All In One Schema.org Rich Snippets
[resolved] How to remove the rating function? (5 posts)

  1. celine37
    Member
    Posted 1 year ago #

    Hi,
    First, this plugin works very, it's very easy to configure! I installed it on my recipes blog.
    On this blog, I've already installed a plugin for ratings (GD star) with several hundred ratings since 2 years. So I would like to conserve it, and I wonder if it's possible to remove the rating function on the front office to avoid duplicate ratings...
    Regards
    CĂ©line

    http://wordpress.org/extend/plugins/all-in-one-schemaorg-rich-snippets/

  2. Nitin Yawalkar
    Member
    Plugin Author

    Posted 1 year ago #

    Hey celine37,

    Thanks for using our plugin and happy to know that you found it useful.

    Well, I don't know whether the GD star rating plugin uses the rich snippets markup or not, if it does not uses the rich snippets markup, removing the rating function from our plugin will break the rich snippets in search results as Google highly recommend to use the rating in recipe rich snippets.

    If the GD star rating plugin uses the rich snippets, then you can surely remove the rating function from our plugin. To do so, follow these steps:

    • Go to plugins -> editor -> All In One Schema.org Rich Snippets
    • Locate the file functions.php
    • Find and comment the following line :

      $recipe .= bsf_do_rating();

      as

      // $recipe .= bsf_do_rating();

      This will remove the rating input.

    • And also comment the following code:
      if($args_recipe['recipe_rating'] != "")
      			$recipe .= '<div class="snippet-label-img">'.$args_recipe['recipe_rating'].'</div>';
      
      		$recipe .= ' <div class="snippet-data-img"> <span itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"><span itemprop="rating" class="rating-value">'.$agregate.'</span><span class="star-img">';
      			for($i = 1; $i<=$agregate; $i++)
      			{
      				$recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png">';
      			}
      			for($j = 0; $j<=5-$agregate; $j++)
      			{
      				if($j)
      					$recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png">';
      			}
      
      		$recipe .= '</span> Based on <span itemprop="count"><strong>'.$count.'</strong> </span> Review(s)</span></div><div class="snippet-clear"></div>';

      As

      /*
      		if($args_recipe['recipe_rating'] != "")
      			$recipe .= '<div class="snippet-label-img">'.$args_recipe['recipe_rating'].'</div>';
      
      		$recipe .= ' <div class="snippet-data-img"> <span itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"><span itemprop="rating" class="rating-value">'.$agregate.'</span><span class="star-img">';
      			for($i = 1; $i<=$agregate; $i++)
      			{
      				$recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png">';
      			}
      			for($j = 0; $j<=5-$agregate; $j++)
      			{
      				if($j)
      					$recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png">';
      			}
      
      		$recipe .= '</span> Based on <span itemprop="count"><strong>'.$count.'</strong> </span> Review(s)</span></div><div class="snippet-clear"></div>';
      */

      This will remove the aggregate rating from description.

    If you want more help, send us request from the plugins admin area.

  3. celine37
    Member
    Posted 1 year ago #

    Thank you so much for your complete response!

    I followed your suggestions of modification, and that's working perfectly. But I realized that GD star rating uses rich snippets with microformats, and your plugin uses microdatas... In Google Structured Data Testing Tool, Google doesn't seem to like both diferent markups. In fact, with your plugin alone, I have a better display of rich snipets with photo + cooking time + votes wich is perfect for me. My old microformat datas didn't work correctly.
    So my choice is done: I use your plugin!
    Thank you!

  4. Nitin Yawalkar
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you for providing feedback. If you need any more help regarding any of our plugins, please let us know from the plugin admin panel.

    Also, if you are happy with the plugin, could you please rate it with 5* and vote it as Works!

    If you have any new ideas or suggestions that might be helpful to improve the usability of this plugin, do let us know.

    Enjoy!
    :)

    Regards,
    Nitin

  5. Jonas Tietgen
    Member
    Posted 4 months ago #

    Hello everybody,

    I am sorry for reopening this thread, but I tried to remove the rating funcion like you explained before, and nothing happened...

    I need to remove it, because there are people out there who think it is funny to rate on things with 1 Star just because they can...

    Do you have an idea why it does not work for me?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.