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! 🎄

Is it possible to query post orderby wpdiscuz rating?

2 Posts
2 Users
0 Reactions
2,718 Views
(@robinwang)
New Member
Joined: 7 years ago
Posts: 1
Topic starter  

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();


   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6581
 

Hi @robinwang,

I'm sorry, but the code will not work as wpDiscuz saves the postmeta vale using the serialized array. 



   
ReplyQuote
Share:
Scroll to top