[Plugin: Query Posts] orderby meta_value and meta_compare problems
Thank you for the great plugin Query Posts. It is extremely versatile.
I am trying to use it in combination with the plugins Widget Logic and WP Post Views to show a list of most viewed posts belonging to a certain category and only visible when on that category page. Now Widget Logic lets me control the category page visibility part. WP Page Views counts page visits and keeps that score in a meta_value with meta_key views. So I expected to be able to use Query Posts to do the rest of the math by giving it the following settings (apart from the obvious title and stuff):
Widget Logic: is_category(‘jazz’)
Now when viewing the ‘jazz’ category page, I see a list of 5 posts that are all from that category. So far so good. But when I check the meta values for key ‘views’ in those posts, they are not in descending meta value order. They appear not even ordered at all.
When I select orderby: date , the order is indeed by date. Further, caller_get_posts:checked does not seem to make any difference (sticky post do not go on top, even when not checked)
I also tested by setting meta_compare (larger than) and meta_value (some average number) to see if I could at least filter out the lesser viewed posts but this did not seem to work either.
Note: I am using the Hybrid News child theme.
- The topic ‘[Plugin: Query Posts] orderby meta_value and meta_compare problems’ is closed to new replies.