kk Star Ratings WordPress plugin customization

i needed a voting system for a client’s wordpress website so i installed this plugin: kk Star Ratings

the standard version is great but has very few options. the quickest way to achieve what the client wanted was to customize the plugin a little bit

show voting only for logged in users

i had to replace the voting box with a message inviting the user to login/signup

i edited the fileĀ /wp-content/plugins/kk-star-ratings/index.php

search for this line:

and replace it with:

of course you can include HTML code between ‘ ‘ to further edit the message: include a link to login page, change the appearance (float, background)

hide voting on some posts

with kk Star Ratings you can choose where you want the ratings to be placed (homepage, archives, posts, pages, categories) but you can’t hide it from some posts (custom posts in my case)

so i edited the fileĀ /wp-content/plugins/kk-star-ratings/index.php

search for this line:

and replace it with:

where 101,151,1001 from the array are the ID’s of the posts