WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
[resolved] Not working for visitors (13 posts)

  1. xWafflecakes
    Member
    Posted 7 months ago #

    The post ratings plugin is not working for my visitors who have made an account at my website. They need to be logged in, but when they press the button (using the heart crystal), it just keeps loading and does nothing.
    I have added the following code to my theme's loop.php so the post ratings show up in every post:

    <center><?php if (function_exists('the_ratings')) { echo expand_ratings_template('<span class="rating">%RATINGS_IMAGES% (<strong>%RATINGS_USERS%</strong> diamonds)', get_the_ID()); } ?></center>

    http://wordpress.org/plugins/wp-postratings/

  2. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    The code is wrong

    It is <?php if(function_exists('the_ratings')) { the_ratings(); } ?> as stated in http://wordpress.org/plugins/wp-postratings/installation/

    Also ensure your theme have <?php wp_header(); ?> and <?php wp_foot(); ?> in them.

  3. xWafflecakes
    Member
    Posted 7 months ago #

    Does their have to be a <?php wp_header(); ?> and <?php wp_foot(); ?> in the loop.php file of my theme? Because there isn't. Thanks for the help!

  4. xWafflecakes
    Member
    Posted 7 months ago #

    Oh by the way I have the same code (that you mentioned) in my theme's single.php. So the post ratings thing is showing up in the post itself (single.php) and also in the index where all posts are shown (loop.php). So the single.php has the right code, but it still won't work.

  5. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    the header and footer code should be in your theme header and footer respectively. Could you try on the default theme to see if it works first?

  6. xWafflecakes
    Member
    Posted 7 months ago #

    Yeah it seems to work for me only, for some reason. Do you think it's a plugin issue? Or a host/server issue?

  7. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    what is your site URL? I don't think it is a plugin issue, if it is, it will not even working on my own site.

  8. xWafflecakes
    Member
    Posted 7 months ago #

    http://www.minecraftinventions.com
    I've been Googling a bit and it seems that the "never ending loading" was/is a problem for a lot of users. But, I have not yet found a solution unfortunately...

  9. xWafflecakes
    Member
    Posted 7 months ago #

    By the way I have also tried several attempts to fix it that didn't work:

    * Checked if <?php wp_footer(); ?> is in my theme's footer.php
    * Checked permissions: folders are 755 and files are 644

    None of these worked :/

  10. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    Could you open it up for public to rate so that I can rate it?

  11. xWafflecakes
    Member
    Posted 7 months ago #

    Sorry for the late response! It's now open for public, I hope you can still help me fix this :) Thanks again!

  12. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    I got a feeling it has something to do with the way your theme is coded. When I rate the post, it freezes for a while and no AJAX call is being make to record the ratings. And if you are using Chrome, go to Console of your site, you will notice a few JS errors as well

    I would need you to test with the default theme to see if the ratings work in the first place.

  13. xWafflecakes
    Member
    Posted 7 months ago #

    I've changed the theme to the default one, can you try it out?

Reply

You must log in to post.

About this Plugin

About this Topic