I just installed the plugin, and I’m trying to use “query_post” in my index.php to sort the most viewed posts.
I’m not sure I got the right name for the meta_key to use.
This is my query (who doesn’t work):
query_posts(array($args,'post_type' => 'videos','meta_key' => 'baw_count_views_meta_key','orderby' => 'meta_value','order' => 'DESC','showposts' => 4) ); get_template_part( 'loop', 'index' );
($args includes ‘post_status’ and ‘paged’).
‘video’ is a custom type.
Am I missing something ? I’m new at WP (and PHP actually). Any help would be great. Thanks 🙂
(Sorry if my English isn’t quite right, it’s not my native language – Frenchie here – :p)
- The topic ‘[Plugin: Post Views Count] how to do a "query_post" with the meta key ?’ is closed to new replies.