• Resolved mavichow

    (@mavichow)


    Hi! really appreciate the plugin, it’s really good!

    just wondering if we have orderby method for us to sort the reviews?
    Currently I’m using WP_Query to get my post_types.. each of my post type had “assign_to” “site_reviews_form” shortcode…

    not too sure if we have options like below for us to implement in codes?:

    $args['meta_key'] = 'site_review';
    $args['orderby']  = 'meta_value';
    $args['order']    = 'DESC';

    thanks!
    appreciate the helps

    • This topic was modified 8 years, 8 months ago by mavichow.
    • This topic was modified 8 years, 8 months ago by mavichow.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Are you trying to sort the reviews or the pages that have assigned reviews?

    If reviews, please give an example of how you want to sort them by (they sort desc by date by default).

    • This reply was modified 8 years, 8 months ago by Gemini Labs.
    Thread Starter mavichow

    (@mavichow)

    Hi!

    I’m trying to sort the post/post-type with assigned review..

    I setup a posttype eg: ‘my_product’

    in my single-my_product.php posttype file, i assign the short_code tie with the post type
    <?php echo do_shortcode('[site_reviews_form assign_to="'.get_the_ID().'"]'); ?>

    So in the other hand, on other pages… I’m using WP_Query to pull the ‘my_product’ contents, currently i’m sorting the orders by post_date… not sure if I can sort via site_reviews_summary?

    $args['post_type'] = 'my_product'
    $args['orderby']   = 'post_date';
    $args['order']     = 'DESC';
    $query = new WP_Query( $args );

    thankyou!

    • This reply was modified 8 years, 8 months ago by mavichow.
    Plugin Author Gemini Labs

    (@geminilabs)

    So you want to sort your products by their overall rating score?

    Thread Starter mavichow

    (@mavichow)

    Yeap, correct…. does the plugin allow us to do that?
    appreciate your help

    Plugin Author Gemini Labs

    (@geminilabs)

    Apologies for the delay.

    At the moment there is no easy way to do this as it would require some custom functions and advanced queries. Give me some time to think about it and I will see if I can come up with a solution.

    Thread Starter mavichow

    (@mavichow)

    Thanks! appreciate your help….

    Plugin Author Gemini Labs

    (@geminilabs)

    Thread Starter mavichow

    (@mavichow)

    Thanks! It works!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘wp_query sort via site-review?’ is closed to new replies.