Jump to content


* * * * * 1 votes

Most popular posts using views post meta in WordPress

wordpress

  • Please log in to reply
No replies to this topic

#1 webrobot

webrobot

    Member

  • Members
  • PipPip
  • 20 posts

Posted 07 January 2012 - 04:43 PM

Place this snippet just before the loop within the index.php template and wordpress will use the post views to order your posts from highest to lowest. Don’t forget that for this to work you will need to setup the post views snippet following this tutorial (http://forums.enbeeo...press-manually/)

<?
query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC');
?>






Also tagged with one or more of these keywords: wordpress