The code is already stated in the FAQ. In the code pasted, it is changing to the schema to Recipe. You can paste it in your theme functions.php
<?php
add_filter('wp_postratings_schema_itemtype', 'wp_postratings_schema_itemtype');
function wp_postratings_schema_itemtype($itemtype) {
return 'itemscope itemtype="http://schema.org/Recipe"';
}
?>
Thread Starter
altnet
(@altnet)
Hi, thank you for such a quick response. I have added the following to the bottom of my functions.php file
add_filter(‘wp_postratings_schema_itemtype’, ‘wp_postratings_schema_itemtype’);
function wp_postratings_schema_itemtype($itemtype) {
return ‘itemscope itemtype=”http://schema.org/Recipe”‘;
}
am assuming php tags not needed. I’m now finding that the code breaks where the ratings are displayed on the page:
http://www.dysoncentre.com/product/refurbished-dyson-dc07-origin-upright-vacuum-cleaner/
Can you confirm the above code is correct?
Thread Starter
altnet
(@altnet)
Hi, thanks for such quick response. I have added the above code to functions file but the page now stops where the ratings are displayed? (First part of description).
http://www.dysoncentre.com/product/refurbished-dyson-dc07-origin-upright-vacuum-cleaner/
Thread Starter
altnet
(@altnet)
Hi, thanks for such quick response. I have added the above code to functions file but the page now stops where the ratings are displayed? (First part of description).
http://www.dysoncentre.com/product/refurbished-dyson-dc07-origin-upright-vacuum-cleaner/
Yes the above code is correct. I am able to see the part after the ratings. Not sure what you are referring to.
Thread Starter
altnet
(@altnet)
Hi, sorry I have no idea why that got posted so many times! I’ve delved into the PHP since and found a solution to my problem. Thanks again for your help.