Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using the Jetpack plugin to get 'site stats' which shows the number of views for blog posts/pages. So I'm no expert or anything but I'm guessing there is a table that stores these views. Is there a way to manipulate this data to create a simple list of the most popular posts by views in the sidebar?

Currently, I'm using a plugin for this but I'd prefer to hard code it straight into the theme.

Any guidance would be massively appreciated.

Thanks for reading!

share|improve this question
1  
Maybe you could take a look at the wordpress.com popular posts plugin? I use that plugin to be able to code into my template where to show posts by popularity. Take a peek at the plugin code and maybe you can just grab what you need? –  Rev. Voodoo Aug 11 '11 at 14:21
add comment

3 Answers

The WordPress.com Popular Posts plugin appears to be working well with Jetpack for me. I've customized a theme-specific "popular posts" widget (in Delicate News from ElegantThemes.com) that was using comments to indicate popular posts using the WPPP_show_popular_posts function that comes with the plugin. You can check out the code at this link http://pastebin.com/s2PFrWEN .

share|improve this answer
add comment

Although wp-postviews (suggested by kevin) is a good plugin, I would definitely recommend the use of post-views since it offers some usable functions so you can hardcore it right into your theme.

share|improve this answer
add comment

Personaly i already used the wp-postviews plugin and it works fine. Comes with a widget to display the list in a sidebar.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.