Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum   wpForo Support Forum

Is it possible to query post orderby wpdiscuz rating?  

  RSS

robinwang
(@robinwang)
New Member
Joined: 1 year ago
Posts: 1
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();

Quote
Astghik
(@astghik)
Support Team Admin
Joined: 3 years ago
Posts: 4482
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. 


ReplyQuote
Share:
Scroll to top