Support » Plugins » WP Post Ratings Time Range for Highest Ratings

  • Resolved haagendazs1

    (@haagendazs1)


    Hi,

    I’m using the WP-PostRatings plugin and I’m trying to make something like a “Highest Rated For This Week” feature. Is there a way to do this, by limiting the highest rated ones displayed to only the past week? Or past month, or whatever.

    I looked around and this seemed like it might be useful:

    <?php if (function_exists(‘get_highest_rated’)): ?>

      <?php
      $mylimit=7*(60*60*24);
      if ( (current_time(timestamp) – get_the_time(‘U’) – (get_settings(‘gmt_offset’) * 3600) ) < $mylimit)
      { ?>
      <?php get_highest_rated(‘post’, 5); ?>
      <?php } ?>

    <?php endif; ?>

    I found that edit for another function on some other thread, and thought it might work, but it’s not working for some reason.

    Any help is greatly appreciated 🙂 Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP Post Ratings Time Range for Highest Ratings’ is closed to new replies.