the_rating() seems not to be clickable (6 posts)

  1. jonandrewgreig
    Posted 4 years ago #

    Hi there,

    I know it's been a while since the plugin was released, so I know there might be a chance it could be a version indiscrepancy, but is one supposed to rate a post or page with "the_rating()" or "the_comment_rating()"? I'm wondering because it seems like one should be able to rate the post/plugin in general, but I can't click the stars or make a rating that way. Any ideas on why this might be the case? Thanks!



  2. yashodhan
    Posted 4 years ago #

    Having the same problem here. Latest version of WP.

    The comment rating stars are greyed out and unclickable.

  3. wintermute77
    Posted 4 years ago #

    I haven't gone through the plugin in detail so this is posted as a hacky fix to get stuff working rather than an actual solution, but:

    The problem appears to be that the javascript is looking for elements with a class of "needs-rating" or "form-rating", but the stars are output inside a list with a class of just "rating".

    Add the "rating" class to the list of elements that the JS attaches to, and the stars start working again.

    In detail:

    Line 6:
    var nratings, fratings;
    var nratings, fratings, sratings;

    Line 72:
    Immediately below:
    fratings = $('.form-rating li');
    add the line:
    sratings = $('.rating li');

    Line 76:
    Immediately below:
    nratings.bind('mouseenter mouseleave', doHover).click(doRating);
    add the line:
    sratings.bind('mouseenter mouseleave', doHover).click(doRating);

  4. barbaralyschenko
    Posted 4 years ago #

    Yes! this plugin works with this solution. thanks #wintermute77 .

  5. timbunch
    Posted 4 years ago #

    That does appear to fix the issue for me too. I noticed it primarily in Chrome.

  6. timbunch
    Posted 4 years ago #

    Now if only it would actually save the rating in the comment_karma field...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Rate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic