Support » Developing with WordPress » Implement stars rating into blog posts.

  • Hello there!

    My name is Aydrean, and I have registered to ask some questions.

    WordPress blogging platform is the best I ever worked with, therefore I like to customize it a lot. At the moment I encountered a problem trying to implement stars rating (schema like) to blog posts. I don’t like to use plugins for every single thing, I would prefer to implement it myself. My page is
    and the blog page is located at so you don’t get confused.
    I am looking for the way to give users ability to star-rate the blog post when commenting.

    Also, using a chance to ask one more not related question, what could I improve on my site?

    Thanks in advance for answers,

    • This topic was modified 3 days, 12 hours ago by  aydrean1.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Whether you like to use plugins or not, that’s how you add code to WordPress. So you can write your own but it’s easiest to look at existing plugins for ideas.

    Moderator bcworkz


    The easy part is displaying the star rating. Use wp_star_rating(). Naturally you need to collect the rating from the user and save the value and/or aggregate it with others. The value can be saved in object meta and submitted to WP from a form field. It’d be easiest to have a dropdown field with a list of numbers, but users generally would expect a graphic interface. This can be accomplished with JavaScript and image sprites. The script then populates a hidden form field with an integer value based on where in the graphic the user clicked.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.