How do I query post by most viewed in descending order?
-
I’m attempting to query post:
<?php query_posts(array(‘post_type’ => ‘videos’, ‘meta_key’ => ‘post_views_count’, ‘orderby’ => ‘meta_value’,’order’ => ‘DESC’,’showposts’ => 4)); ?>
<?php while (have_posts()) : the_post(); ?>This is not working. Please advise.
- The topic ‘How do I query post by most viewed in descending order?’ is closed to new replies.