Support » Plugin: GD Star Rating » Reorder posts(gdsr_sort): how to display all posts, not only reviewed ones

  • I’m working on a restaurant catalog, offering the visitors the ability to sort the restaurant listing by title, price and rating. I’ve added multi-rating review to my restaurant post type and it’s working perfect.

    The thing is that when I want to order my restaurant list by rating using:

    query_posts("post_type=restaurant&gdsr_sort=rating&sort_order=asc&gdsr_multi=3&posts_per_page=-1")

    as Millan suggested, only 9 out of 60 restaurants are being displayed.

    I suppose that is because the rest weren’t reviewed yet. Is that right?

    In that case, would it be possible to add those restaurants to the gdsr tables via sql or any other way? I mean not faking results at all, but at least that they appear on the gdsr tables but without reviews yet (all values with 0).

    Checking plugin tables, I found that restaurants posts that were being displayed were the ones which post_id was included on table wp_gdsr_multis_data.

    What if I add the rest of the posts with SQL associating only the post_id with the multi_id? Would that be fine or there is another correct way to do it on my template directly (i.e. show_empty=1) ?

    Thanks anyone for an answer and again, congratulation for this mastery piece of job.

    http://wordpress.org/extend/plugins/gd-star-rating/

  • The topic ‘Reorder posts(gdsr_sort): how to display all posts, not only reviewed ones’ is closed to new replies.