WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP-PostRating (How to set a limit of ratings that are going to be displayed?) (9 posts)

  1. do77
    Member
    Posted 5 years ago #

    Hi,

    I want to display "Highest Rated" and "Most rated" posts on my page and I would like to set a limit so it would only show the 5 highest/most rated posts. Where can I change it or configure it? The plugin has no option for that unfortunately :(

    do77

  2. do77
    Member
    Posted 5 years ago #

    Do I have to change the "rows" from 15 to 5 in "the postratings-templates.php"?

  3. Lester Chan
    Member
    Posted 5 years ago #

    Did you read the readme.html and note the tabs on top?

  4. do77
    Member
    Posted 5 years ago #

    I did read the readme.html but you know what ... I really didn't note the tabs on top! That's why I was confused about the whole readme.html! Sorry about that ... I am pretty sure now I can figure it out :)

  5. Lester Chan
    Member
    Posted 5 years ago #

    No worries =)

  6. do77
    Member
    Posted 5 years ago #

    Ok, works perfectly! Thanks!

  7. do77
    Member
    Posted 5 years ago #

    Sorry, not resolved :(

    I put this <?php if(function_exists('the_ratings')) { the_ratings(); } ?> in single.php where I want it to show up and it works fine. It shows Stars, Votes, Average etc.

    Then I put the following code on my homepage:

    <div class="two-col">
     <h2>Entries of the month</h2>
     <p><strong>Highest Rated</strong></p>
     <?php if (function_exists('get_highest_rated')): ?>
       <ul>
          <?php get_highest_rated_range('1 month','post',1,5); ?>
       </ul>
    <?php endif; ?>
    <br />
    <p><strong>Most Rated</strong></p>
    <?php if (function_exists('get_most_rated_range')): ?>
       <ul>
          <?php get_most_rated_range('1 month','post',1,5); ?>
       </ul>
    <?php endif; ?>
    
    </div>

    But when I now rate an article it will not show it. It also only displays only the stars and not the additional stats. :(

    Any suggestions?

    Thanks to everyone,
    do77

  8. do77
    Member
    Posted 5 years ago #

    Anyone an idea what I made wrong?

  9. Lester Chan
    Member
    Posted 5 years ago #

    wp-admin -> ratings -> ratings template.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.