Forums Forums Search & Filter Pro Sort Results by star rating

  • This topic has 36 replies, 2 voices, and was last updated 8 years ago by Anonymous.
Viewing 10 posts - 11 through 20 (of 37 total)
  • Anonymous
    #70418
    This reply has been marked as private.
    Trevor
    #70430
    This reply has been marked as private.
    Anonymous
    #70439
    This reply has been marked as private.
    Trevor
    #70517

    OK. I looked at the form ID 261) called Search Form.

    First looks:

    Number of Results per page. In WordPress, use -1 to specify unlimited 😉

    I added a Post Meta to the page to see if it I could find the ratings fields in the meta keys list. In the Options I changed Get Options to Manual Entry and then clicked Browse Values. This lets you see what is there 😉

    It shows only two possible values; 5 and 0. Is this correct?

    I will leave that field there for now for you to look at.

    Anonymous
    #70522
    This reply has been marked as private.
    Trevor
    #70536
    This reply has been marked as private.
    Anonymous
    #70542
    This reply has been marked as private.
    Trevor
    #70547
    This reply has been marked as private.
    Anonymous
    #70676
    This reply has been marked as private.
    Anonymous
    #70756

    Thanks for all the help Trevor, sorry to come back to you so quick but the code added in the results.php has just come up with ‘Array’ rather than the star rating?

    while ($query->have_posts())
    {
    $query->the_post();

    ?>
    <div>
    <h2>“><?php the_title(); ?></h2>

    <p><br /><?php the_excerpt(); ?></p>
    <?php
    if ( has_post_thumbnail() ) {
    echo ‘<p>’;
    the_post_thumbnail(“small”);
    echo ‘</p>’;
    }
    ?>
    <p><?php echo get_post_meta( get_the_ID(), ‘ratings_average’ ); ?></p>
    <p></p>
    <p><small></small></p>

    </div>

    <hr />
    <?php

Viewing 10 posts - 11 through 20 (of 37 total)