Filter Top Ratings by terms
-
Hi,
I hope this beautiful plugin is not too dead and someone can help me.
I am actually displaying a list of top rated posts on a special page, with something like that :
$arguments = array( 'post_type' => 'custom', 'number' => 50, // max. number of posts to retrieve 'offset' => 0, // offset from where to start 'sortby' => 'bayesian_rating', // bayesian_rating, rating or votes 'order' => 'DESC', // ASC or DESC 'date_limit' => 0, // date limit in days ); $results = PostRatings()->getTopRated($arguments); foreach($results as $post){ ...
This is working fine. The result of my code makes the request a bit heavy but necessary, and I am using cache to solve that. Anyway, now the problem is I want to filter this “top posts” with a term from a custom taxonomy. I tried theses lines in my arguments :
'custom-tax' => 'term',
or
'tax_query' => array( array( 'taxonomy' => 'custom-tax', 'field' => 'slug', 'terms' => 'term' ) )
Both are not working of course. There is probably other solutions I not find yet, but maybe it is just impossible to do this request with Post Rating plugin ?
Please help me ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Filter Top Ratings by terms’ is closed to new replies.