Most Popular Categories by Posts
Most Popular Categories by Posts is a WordPress plugin that allows you to list your blog’s most popular categories based on the number of posts assigned to those categories within a user-configurable time period. What a mouthful. Basically, it allows you to display the categories with the most posts this week, this month, this year, etc.
For example, if you chose to display the most popular categories in the past 30 days, and in the past 30 days, you had posted the most articles (let’s say 20 posts) to Category A and the second most articles (let’s say 18 posts) to Category B, the plugin would place Category A at the very top of the list, followed by Category B, and so on.
Demo / Screenshot
- Sorry, no demo available, but here’s a screenshot of the most popular categories on blogHelper for the last 30 days (i.e. from 1st to 30th August, 2006):
Features
- Page independent
Just like your normal category listing, you can place the list of your most popular categories in any template you like. - Configurable
If you want to, you can choose how many days of posts the plugin should take into account, how many popular categories to show, and whether or not the number of posts are shown. You can even modify the title of the output block and the various layout tags used (e.g. ul, li, div). - Simple installation and no file modifications required
All primary options are handled by passing variables through the template tag. There is no need to modify plugin files (unless you want to)
Installation
- Download Most Popular Categories by Posts and extract the zip archive file.
- Upload popular-categories.php to your /wp-content/plugins/ directory.
- Activate the plugin in your blog’s Manage Plugins panel.
- Edit your theme templates according to the usage instructions below via your blog’s Theme Editor panel.
Usage
- Edit Templates:
- Standard: In any of your templates (e.g. Main Index, Page Template), use the template tag zm_popular_categories() wherever you want the list to appear.
- Custom: Follow the same instructions as for Standard usage, but use a modified template tag following this structure: zm_popular_categories ($no_of_days, $show_title, $limit, $show_number_of_posts, $custom_title, $pre_item_tag, $post_item_tag, $pre_list_tag, $post_list_tag, $pre_no_of_posts_tag, $post_no_of_posts_tag).
- $no_of_days: By default, the plugin lists the most popular categories for the past 7 days. If you want to show more or less, enter the number you want.
- $show_title: By default, the “Most Popular Posts This Week:” title is not shown. If you do want to show it, put 1.
- $limit: By default, only the 5 most popular categories are shown. If you want to show more or less, enter the number you want.
- $show_no_of_posts: By default, the number of posts assigned to each category within your selected time period is shown. To turn number of posts off, put 0.
- $custom_title: By default, the title of the Recent Child Pages block is “Most Popular Posts This Week:” (if $show_title is set to 1). Change this as you see fit.
- $pre_item_tag: By default, each item is pre-pended with a <li> tag. Change this as you see fit.
- $post_item_tag: By default, each item is post-pended with a </li> tag. Change this as you see fit.
- $pre_list_tag: By default, the entire list is pre-pended with a <ul> tag. Change this as you see fit.
- $post_list_tag: By default, the entire list is post-pended with a </ul> tag. Change this as you see fit.
- $pre_no_of_posts_tag: By default, the number of posts in each category is pre-pended with a <span> tag. Change this as you see fit.
- $post_no_of_posts_tag: By default, the number of posts in each category is post-pended with a </span> tag. Change this as you see fit.
- Edit Stylesheet:
- By default, the list of most popular categories comes unstyled. You can style it using your blog’s primary stylesheet though.
- The entire block is wrapped with a “div” of class “zm_pop_cats“.
- By default, the list is an unordered list with no class or id – though this can be modified as you see fit.
- By default, each item is a standard list item – though this can be modified as you see fit.
- Number of posts in each category are wrapped by a “span” of no class or id.
- By default, the list of most popular categories comes unstyled. You can style it using your blog’s primary stylesheet though.
Download
Changelog
- v0.1: Plugin first released.
To-Do
- Implement results cache.
- Allow user-configurable date range (i.e. beginning and end date), rather than just last XX days.
- Allow the display of title (with permalink) and date of most recent post in most popular categories.








59 Comments
August 29th, 2006 at 6:51 pm
[...] You might prefer a graphical explanation, so here’s blogHelper’s most popular categories in the past 30 days: To download the plugin (and get further details at the same time), check out the Most Popular Categories by Posts plugin’s dedicated page. [...]
August 30th, 2006 at 6:18 pm
[...] 插件页面: 点击进入 [...]
September 15th, 2006 at 9:02 am
[...] Most Popular Categories by PostsNow for some shameless plugging of my own plugin (pun not intended). What it does is to “…list your blog’s most popular categories based on the number of posts assigned to those categories within a user-configurable time period.” It could be useful, for example, on commmunity/multi-author blogs to indicate categories that your bloggers liked writing about this month. [...]
October 4th, 2006 at 6:17 am
Hello,
I installed your plugin and it was working fine. Now though, it has stopped and I am receiving the following error:
Invalid argument supplied for foreach() in /home/venturee/public_html/viralvoice/wp-content/plugins/popular-categories.php on line 29
I didn’t change anything (it seemed to work last night when I went to bed, and now when I woke up to restart working it doesn’t work at all.)
I did upload a new plugin yesterday afternoon, which was a mod of the orginal popularity contest plugin (http://www.thunderguy.com/semicolon/2005/09/22/popularity-contest-for-pages/), but popular categories was working after I had installed the updated plugin.
October 9th, 2006 at 4:48 pm
I’ve to admit I’m stumped at the moment. I don’t see any cause for conflict either, but I’ll continue checking it out. Sorry for the problems.
November 1st, 2006 at 1:06 pm
[...] Most Popular Categories by Posts [...]
November 14th, 2006 at 7:42 am
[...] 插件页面: 点击进入 [...]
November 16th, 2006 at 5:39 am
By default, there’s no space between the category name and the numer of posts. Also, it is not possible to replace the word “posts” for another word. Other than that, the plugin is exactly what I was looking for. Thanks.
April 30th, 2007 at 3:50 pm
doesn’t work for us
only shows zm_popular_categories()
May 19th, 2007 at 11:54 pm
[...] Visit [...]
June 12th, 2007 at 9:33 am
[...] .12 Most Popular Categories By Posts [...]
June 13th, 2007 at 2:30 pm
June 14th, 2007 at 4:13 pm
[...] Most Popular Categories by Posts [...]
June 21st, 2007 at 7:25 am
[...] Most Popular Categories by Posts. Tai įskiepis, kuris pateikia pasirinkto laikotarpio populiariausių (pagal straipsnių skaičių) tinklaraščio skyrių sąrašą. Įskiepis turi kelis nustatymų parametrus, kuriais galima pasirinkti laikotarpį (šią savaitę, šį mėnesį, šiais metais arba per paskutines X dienų) ir t.t. [...]
July 7th, 2007 at 11:21 pm
Hi, I just recently discovered your plugin. It is much appreciated. Do you think it is possible to add parent/ child option? Maybe saomething like is_child (‘ ‘) so we could only show popular posts within the child categories. Like you have Income Streams and popular children categories would be Adsense, Chitika, YPN, etc…
July 10th, 2007 at 12:51 pm
[...] Most Popular Categories by Posts [...]
July 17th, 2007 at 3:14 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
July 18th, 2007 at 8:00 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
July 26th, 2007 at 5:30 pm
[...] Most Popular Categories By Posts – Allows you to display the most popular categories based on the number of posts in each category by a certain date range you define. [...]
August 15th, 2007 at 2:33 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
August 19th, 2007 at 12:29 pm
[...] it’s inbuilt into most themes. Top categories and posts are thanks to the plugins “Most popular categories by posts“and “WP-PostViews“. Related links is an impressive plugin, “Related [...]
August 21st, 2007 at 10:10 pm
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
August 23rd, 2007 at 10:31 pm
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
August 30th, 2007 at 8:54 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
September 17th, 2007 at 5:52 pm
yaşasın forum siteleri
November 5th, 2007 at 3:39 am
[...] usar Google durante un rato, sólo encontré un plugin que hiciera lo que buscaba: Most Popular Categories by Post, de Ang Zhuu Ming. El problema es que este plugin no es válido a partir de la versión 2.3 de [...]
November 14th, 2007 at 2:08 pm
[...] Most Popular Categories By Posts – Lists the most popular categories based on number of posts assigned to each category within a user-configurable time period. [...]
November 24th, 2007 at 7:42 am
Update for 2.3 WPMU, change select statement to:
SELECT p.ID, p.post_title, p.post_date, c.term_id as cat_ID, c.name as cat_name, p2c.object_id as post_id, p2c.term_taxonomy_id as category_id
FROM $wpdb->posts p
LEFT JOIN $wpdb->term_relationships p2c
on p.ID = p2c.object_id
LEFT JOIN $wpdb->term_taxonomy tt
ON p2c.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN $wpdb->terms c
ON tt.term_id = c.term_id
WHERE post_status = ‘publish’
AND p.post_date > DATE_ADD(CURDATE(), INTERVAL -$zmpc_days DAY)
ORDER BY p.post_date DESC
December 2nd, 2007 at 5:24 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
January 27th, 2008 at 5:10 pm
[...] Most Popular Categories By Posts – Lists the most popular categories based on number of posts assigned to each category within a user-configurable time period. [...]
February 20th, 2008 at 10:15 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
February 20th, 2008 at 10:16 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
February 20th, 2008 at 10:17 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
February 20th, 2008 at 10:36 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
February 22nd, 2008 at 2:43 pm
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
February 23rd, 2008 at 5:48 pm
[...] לסידור רצף הקטגוריות: mycategoryorder. ישנו גם תוסף נחמד בשם: Most Popular Categories by Posts המאפשר להציג בסיידבר את הקטגוריות הכי פופולאריות. [...]
February 23rd, 2008 at 11:13 pm
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
March 2nd, 2008 at 9:46 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
March 4th, 2008 at 6:52 am
[...] בטאב פלאשי. התוסף נקרא: Tab View Most Popular Categories by Posts תוסף סייד-ברי חמוד המציג את הקטגוריות הפופולאריות ביותר בבלוג. [...]
March 12th, 2008 at 6:01 am
[...] Most Popular Categories By Post WordPress Plugin [...]
March 12th, 2008 at 6:04 am
[...] Most Popular Categories By Post WordPress Plugin [...]
March 16th, 2008 at 3:17 pm
[...] Most Popular Categories by Posts [...]
May 9th, 2008 at 4:48 pm
[...] Most Popular Categories – List your categories by the amount of posts in them. [...]
May 9th, 2008 at 6:08 pm
[...] to your homepage for your visitors. Related Posts – Shows similar posts at the end of each post. Most Popular Categories – List your categories by the amount of posts in them. WP-Print – Allows your readers to print your [...]
May 9th, 2008 at 8:58 pm
[...] Most Popular Categories – List your categories by the amount of posts in them. [...]
May 9th, 2008 at 8:58 pm
[...] Most Popular Categories – List your categories by the amount of posts in them. [...]
May 20th, 2008 at 5:41 pm
ジュエリーマキの新しいお店。素敵なジュエリーや、パール、ブランドバック、ブランド時計などのラグジュアリーアイテムをお手ごろ価格でご提供しております。
リフォームをサポートするリフォーム会社ならグローバルネット。トータルリフォーム 千葉・東京でする際に。
マンツーマン英会話スクールの7アクト。東京、大阪、名古屋で英会話レッスン。
June 26th, 2008 at 6:46 am
Thanks so much.
November 4th, 2008 at 3:59 pm
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
December 4th, 2008 at 12:09 am
thank you very much
January 13th, 2009 at 4:55 pm
[...] Most Popular Categories By Posts – Lists the most popular categories based on number of posts assigned to each category within a user-configurable time period. [...]
February 26th, 2009 at 6:38 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
April 9th, 2009 at 10:00 am
[...] Most Popular Categories by Posts muestra una lista de las categorías más populares y para esto se basa en la cantidad de entradas que tiene cada categoría. El usuario puede configurar un período de tiempo a tener en cuenta. Así, puedes mostrar las categorías más populares del mes, del año, o de la semana. [...]
May 5th, 2009 at 9:36 pm
This plugin does not work on Wordpress 2.7. I think they changed the database structure.
July 15th, 2009 at 2:04 pm
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
August 13th, 2009 at 3:35 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
November 2nd, 2009 at 3:24 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
November 30th, 2009 at 3:59 am
[...] Most Popular Categories By Posts: Yazı yoğunluğunuza göre en popüler kategorileri listeleyen bir eklenti. [...]
January 15th, 2010 at 1:30 pm
[...] Most Popular Categories By Posts – Lists the most popular categories based on number of posts assigned to each category within a user-configurable time period. [...]
Leave a Reply