This plugin has been abandoned!
If you are a developer and would like to fork, feel free to do so (under the GPLv3 license). No need to contact me.
WordPress.com Popular Posts integrates with WordPress.com Stats plugin, providing a widget to show the most viewed posts.
Installation
- From v2.0.0, WordPress 2.8 is required. If you are using an older version of WordPress, use v1.3.5 of this plugin.
- Install WordPress.com Stats plugin (required at least v1.2!!!)
- Download WordPress.com Popular Posts
- Extract the files in the .zip archive, and upload them (including subfolders) to your /wp-content/plugins/ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Place the widget where you like in your sidebars
- Enjoy!
Themes Integration
If your theme supports widgets, you can place the widget named ‘Popular Posts’ where you want.
If it doesn’t, put this code inside the file sidebar.php, in your theme files:
<?php if (function_exists('WPPP_show_popular_posts')) WPPP_show_popular_posts(); ?>
Optionally you can add some parameters to the function, in this format:
name=value&name=value etc.
Possible names are:
- title (title of the widget, you can add tags (e.g. <h3>Popular Posts</h3>) default: Popular Posts)
- number (number of links shown, default: 5)
- days (length of the time frame of the stats, default 0, i.e. infinite)
- show (what you want to show; it can be: both, posts, pages; default is both)
- format(the format of the links shown, default:
<a href='%post_permalink%' title='%post_title%'>%post_title%</a>
)
- excerpt_length (the length of the excerpt, if %post_excerpt% is used in the format)
- title_length (the length of the title links, default 0, i.e. unlimited)
- exclude (the list of post/page IDs to exclude, separated by commas. Read the FAQ for instructions)
- cutoff (don’t show posts/pages with a view count under this number, default 0, i.e. unlimited)
- list_tag (can be: ul, ol, none, default ul)
- category (the ID of the category, see the FAQ for info. Default 0, i.e. all categories)
- cachename (it is used to enable the cache. Please read the FAQ).
You can use these special markers in the format value:
- %post_permalink% the link to the post
- %post_title% the title the post
- %post_title_attribute%the title of the post; use this in attributes, e.g.
<a title='%post_title_attribute%'...
- %post_views% number of views
- %post_excerpt% the first n characters of the content. Set n in the widget options.
- %post_category% the category of the post
Example
If you want to show the widget without any title, the 3 most viewed articles, in the last week, and in this format: My Article (123 views) you will use this:
<?php WPPP_show_popular_posts( "title=&number=3&days=7&format=<a href='%post_permalink%' title='%post_title_attribute%'>%post_title% (%post_views% views)</a>" );?>
Shortcodes
If you want to include the list in a particular page or post, you can use shortcodes. Please read the FAQ for further info.
FAQ
Please read other updated FAQ here.
Changelog
You can read the whole changelog on the project page.
Download

Download latest version of WordPress.com Popular Posts for WordPress 2.8+
or v1.3.5 for WordPress < 2.8
License
WordPress.com Popular Posts is released under a GPL v3 license.
This plugin required many hours of development. If you like this plugin, then buy me a coffee!![]()
541 risposte su “WordPress.com Popular Posts”
Ok I see you have added a “cache_only_when_visitor” flag.
Maybe setting this to ‘1’ and setting “$cache_expire = 0;” will help?
I mean, as “visitor” the plugin should return ONLY cache version whatever the cache_expire value is….
Good afternoon – love the plugin!
For some reason this afternoon it seems not to be working on my site – http://www.406northlane.com/
I have changed nothing so I’m not sure if it’s something that you’re aware of.
Thanks in advance!
Hi everybody, I’m not at home, and I’m not using my PC, but I’ll try to answer as I can.
@Blutarsky: If your theme is widget-capable, you can the option “Mostra la versione in cache solo agli utenti non loggati:” (the last one). Otherwise, please read the FAQ under the section “How can I enable the caching system when using WPPP_show_popular_posts()?”.
@Emore: your feature request is being introduced in the trunk. Please wait for a new release.
@Coco: I’m glad it worked for you. You can set ordered list/Unordered list under the widget settings. But if your theme is not widget-ready, you must add list_tag=ol to the function’s parameters.
And I’m absolutely interested in spanish translation. Please read the FAQ about this.
@Chris Brown: this plugin really should retain your settings during an update. But as you’re telling me that it is not, I should look for a bug in the update process, as soon as I can.
Are you using my plugin as a widget or calling it by the WPPP_show_popular_posts() function?
@chewie: thank you for reporting. As you can see on my site, my plugin is working fine for me. Could you please read the FAQ and mail me a debug report?
Thank you!
@frasten – things seems to have worked themselves out. Once again I changed nothing and the plugin is working fine. May just have been a glitch in the Intraweb. Thanks!
Hey Fransten, the OL thing worked fine… in FF and Chrome (didn’t test in Safari and Opera but I assume it works fine). However, in IE7 and IE8 the ordered list shows all as 1. In example, I have a 5 items list and it shows like this:
1. Item 1
1. Item 2
1. Item 3
1. Item 4
1. Item 5
Any help about this? ;-(
btw, check your mail, I sent you the Spanish translation :o)
Frasten I’m not using widgets and I saw how to enable the cache. What I would like to know is what version is served to visitors: cache only, regardless of the time interval?
[…] WordPress.com popular posts – Listing your most popular posts can be a self fulfilling prophecy, but it’s not necessarily a bad thing to […]
I don’t get anything showing, apart from ‘Popular Posts’. Does it take a little bit of time to start showing popular posts? Or have I done something wrong?
Thanks.
[…] Popular Posts: Shows, um, popular posts from your site. Requires the WordPress.com Stats plugin. It’s nice for new visitors to get a quick view of what people like on your site, because those posts and pages should theoretically be among your best. […]
[…] WordPress.com Popular Posts – I use this plugin in the sidebar to show the 10 most popular posts on my blog. It is avery good way of showing your visitors your most popular posts, and it does improve usability of the site, plus improves your stats like pages viewed per visit, time spent on site and bounce rate. […]
Great plugin, thanks.
Ciao there Frasten,
I’m currently using your latest plugin with wp 2.8.4.
I have setup the plugin with no widgets, to use the cache, and it works properly.
The only problem I see is that, once the timeout is reached, the plugin queries again the stats database, cache or not.
In my opinion, the cached version for non-logged users, should be kept the same, until a logged-in user will trigger the timeout forcing a cache update.
What do you think?
Hi,
I’ve been using your plug-in for a couple weeks and really like it. I am having a couple challenges with it and am hoping that you can give me some suggestions on how to fix them.
1. I use html tags in parts of my post headlines. The plug-in doesn’t recognize them so the tags are visible in the popular pages list. Any thoughts on how to make them disappear or, even better, be utilized?
2. When I installed the plug-in, I saw the proper list of eight popular posts. About a week ago, all of the items in the list disappeared. Over the next couple days, 1-3 popular posts started to populate the list again. The few that are showing up in the list are the most popular (couple hundred visits daily) but obviously others should be showing up as well. I just increased the number of titles that should show up but there’s no change. Any thoughts?
Thanks in advance for any suggestions you can offer. I really appreciate your time and hard work.
First of all, great plugin. I love it and it does (almost!) everything I need it to do.
I am having one issue. When I am using it to list the most popular posts in a category, it will only work if the category ID is less than 10 (i.e. ID=less). I have one category on my site with an ID of 59 which the plugin refuses to work for.
I have confirmed that the plugin is receiving the correct ID number by echoing the variable above the output.
Any thoughts?
Awesome plugin. How can I make the display horizontal instead of vertical?