A nice feature of the Extra Theme is its integrated post ratings system. Users can easily rate posts (on a 5-star scale). The average rating for posts is then displayed in various places, and can be used to sort the posts by popularity. While it is possible to selectively disable ratings for particular posts there is not, to my knowledge, an option to completely disable ratings throughout the entire site.
To disable post ratings globally, we can add the following into functions.php (ideally into the functions.php file of a child theme):
/* Disable star ratings */ function disable_ratings() { return false; } add_filter('extra_is_post_rating_enabled', 'disable_ratings');
(Note that editing .php files can be risky, so be sure to make a backup of your site files before adding this code.)
Now you should find that users no longer have the option to rate posts, and that the post ratings are not displayed in post listings, etc.
How to remove “ABOUT THE AUTHOR” in the single post page? Help is appreciated.
Hi Andrew, I’ve just published a post on how to remove Extra’s About the Author box. Hope that helps!
Thank’s a lot! Very helpfull
Hi Dan. I manage to solve this with CSS:
/* Ratings */
.rating-stars {
display: none;
}
The only problem with this solution is that the ” | ” near the comments count continues, and I still don’t know how to remove it…
Hey Andre, yeah hiding it with CSS will mostly work as you’ve seen. Removing the “|” is a bit trickier. One approach (which I haven’t tried) could be to hide all the “|”s using a trick such as the ones in this post:
http://stackoverflow.com/questions/15196630/hide-text-node-in-element-but-not-children
Then selectively add new “|”s where needed using the content property of the “:after” pseudo selector.
It’s a bit messy though, and you’d probably have to play around with padding. If you haven’t tried it, I’d suggest giving the code in the post above a go – it disables the star ratings within Divi itself, so Divi automatically takes care of all of the display issues such as the “|”s.
Hi Dan. I manage to solve this with CSS:
/* Disable Ratings */
.post-footer .rating-stars, .rating-stars {
display: none;
}
The only problem with this solution is that the ” | ” near the comments count continues, and I still don’t know how to remove it…
Do you know how to reset a user’s ratings from the website? I added a few to several of my own blog posts but now I just want to show the ratings of other readers.
Hey Cymre, hopefully this post will help:
https://extrabooster.com/managing-star-ratings-in-extra/
Let me know if you have any questions about it, etc. Thanks!