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.
-
Trevor(Private) November 16, 2016 at 1:23 pm #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
toManual Entry
and then clickedBrowse 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(Private) November 16, 2016 at 8:43 pm #70756Thanks 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 -
AuthorPosts