WordPress.org

Support

Support » Plugins and Hacks » All In One Schema.org Rich Snippets » [Resolved] How to remove the rating function?

[Resolved] How to remove the rating function?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Nitin Yawalkar

    @yawalkarm

    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.

    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!

    Plugin Author Nitin Yawalkar

    @yawalkarm

    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

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How to remove the rating function?’ is closed to new replies.
Skip to toolbar