Notifications
Clear all
Limited Support
Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.
We appreciate your patience and understanding while our team is away. Thank you for being part of the gVectors community!
Merry Christmas and Happy Holidays! 🎄
Topic starter
22/05/2019 1:55 pm
Hello,
I want to query post orderby the post meta of wpdiscuz rating, but not work. How should i do? I used the code below:
$args = array(
'post_type' => 'product',
'showposts' => 10,
'meta_key' => 'wpdiscuz_rating_count',
'orderby' => 'meta_value_num',
'order' => 'DESC',
'tax_query' => array(
array(
'taxonomy' => 'brand',
'terms' => none,
),
)
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post();
22/05/2019 2:30 pm
Hi @robinwang,
I'm sorry, but the code will not work as wpDiscuz saves the postmeta vale using the serialized array.
