Hi, I need order sort answer by votes point. How do?
1 Answers
Hi thawranong,
You can go to wp-content/themes/your-theme-folder
and add this code to functions.php
add_filter( 'dwqa_prepare_answers', 'dwqa_theme_filter_answers_by_vote' ); function dwqa_theme_filter_answers_by_vote( $args ) { $args['orderby'] = 'meta_value_num'; $args['meta_key'] = '_dwqa_votes'; $args['order'] = 'DESC'; return $args; }
Regard,
Please login or Register to submit your answer