Support » Fixing WordPress » List popular posts (from Stats plugin) with WP_Query

  • I don’t think this would be that hard to accomplish. Though, I’m not necessarily a coder, so I may be wrong. Regardless, here’s the request.

    We’ve got the Stats plugin on our blog to track our visits and post popularity. In conjunction with that, we’ve got Popular Posts to list the most popular posts Stats are tracking on our front page’s right sidebar. Popular Posts’ customization possibilities are severely limited, however. I’d like to customize it to match our ‘Latest News’ bit that shows up on the sidebar whenever you’re on an article (example here). We use WP_Query to accomplish that style of listing.

    Is there, perhaps, anybody willing to try this? The code could look something like this (note the “popular=true”).

     global $post;
     $myposts = get_posts('numberposts=10&popular=true');
     foreach($myposts as $post) :
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘List popular posts (from Stats plugin) with WP_Query’ is closed to new replies.