Tag Happy: Popular Tags Plugin July 9, 2005

Theron Parlin

In an ongoing effort to make this site as cool as possible, I’ve created my first Wordpress plugin called “Popular Tags.” The purpose of the plugin is to create a finite list of popular tags used and to display said list by weight. Since tags are ongoing, the list needs to be finite or my homepage would grow into a huge ugly list of tags. So what I’ve done is created a plugin that will only show the x number of popular tags (the tags being wordpress categories under the hood). To see this plugin in action, visit my home page.

I started out with Matt Kingston’s Weighted Categories code and made some changes (one of which fixes a bug with Matt’s plugin where the last category in your list isn’t displayed properly). The format to use the plugin is no different than how it’s used on Matt’s plugin:

< ?php
$minfont = 8;
$maxfont = 14;
$fontunit = "pt";
$category_ids_to_exclude = "";
popular_tags($minfont, $maxfont, $fontunit, $category_ids_to_exclude);
?>

You can download the plugin here. Let me know if it works out for you.

Article printed from Squible: http://www.squible.com
URL to article: http://www.squible.com/2005/07/09/tag-happy-popular-tags-plugin/

    46 Responses to “Tag Happy: Popular Tags Plugin”

  1. April July 10th, 2005 at 12:40 am | Permalink

    I’ll have to implement this on my blog Theron. Anyhow, just stopping by because you #1 Because you updated and #2 - because I’ll be in Houston until Wednesday evening. I have to take care of financial aid stuff and pick up my diploma. :)

  2. joscarfas July 15th, 2005 at 7:09 pm | Permalink

    Hey guys - this is a very nice plugin which I am very interesting to incorporated in my weblog, however it is not working … all I get is the code instead of the actual tags. any idea what the problem could be?

  3. Theron Parlin July 15th, 2005 at 9:30 pm | Permalink

    Answered in email, problem solved… he copied the code above without removing the space between the < and ?

  4. Scattered » Blog Archive » Last Week in Web July 18th, 2005 at 11:29 am | Permalink

    […] Squible » Tag Happy: Popular Tags Plugin— Tagged as: [Plugins Wordpress] Links […]

  5. Squible » A Tag System Based on Wordpress Categories July 23rd, 2005 at 8:48 am | Permalink

    […] popular_tags() Of course I use popular tags, which I’ve rolled into this plugin. I also made a small change to the code so that popular tags get displayed in alphabetical order. Directions on using the popular tags plugin can be found here. […]

  6. Martin Gordon’s Blog » Blog Archive » More Tag-based Organization August 17th, 2005 at 11:09 am | Permalink

    […] I’ve added a weighted categories plugin that formats the categories in the sidebar a bit better than the simple categories list Wordpress comes with by default. […]

  7. Makki September 6th, 2005 at 1:09 pm | Permalink

    Can i use this plugin to display my links in my links page?

  8. Theron Parlin September 6th, 2005 at 1:22 pm | Permalink

    No it can’t be used for that, sorry… I can’t even think how it would be hacked to do that unless you did it randomly or something.

  9. Fairweb September 10th, 2005 at 11:25 am | Permalink

    I’ve just tested this plugin on my test blog (WP 1.5.3) and it works perfectly. Good job !

  10. Danloreye December 10th, 2005 at 8:47 am | Permalink

    I have a slight problem with this nice plugin: I can’t access the last category. I tried “Weighted Categories” and it behaves the same way.

  11. Colin Cameron December 14th, 2005 at 1:21 am | Permalink

    @Danloreye - Im having the exact same issue. Is it not creating the URL correctly and just putting the category name after the current URL?

  12. Theron Parlin December 14th, 2005 at 1:25 am | Permalink

    Colin, Dan,

    Are you guys using mod_rewrite for permalinks?

  13. Colin Cameron December 14th, 2005 at 1:30 am | Permalink

    @Theron - Sorry, I actually just refreshed the page and it does work correctly now. Although the “Weighted Categories” plugin still doesn’t but I noticed you mentioned that in your post above.

    Is there a way to stop the “…” from showing up in between tags?

  14. Theron Parlin December 14th, 2005 at 1:34 am | Permalink

    Yes, edit the plugin and remove the “…” from the code. :)

  15. Colin Cameron December 14th, 2005 at 1:36 am | Permalink

    Thanks a lot for the quick response and nice work with the plugin!

  16. gelund February 28th, 2006 at 8:30 am | Permalink

    The “last entry” bug seems to still be there.

  17. gelund February 28th, 2006 at 8:35 am | Permalink

    Note the last catagory URL fails to build a proper string containing catagory ID.

  18. gelund February 28th, 2006 at 9:34 pm | Permalink

    For what it’s worth, I was able to resolve the Catagory ID issue above by setting the Permalink Structure to use Custom Structure “/%category%” instead of the default ID method.

  19. rawlinson - us » Blog Archive » Top Categories Plugin March 1st, 2006 at 3:08 pm | Permalink

    […] I created a new wordpress plugin called Top Categories. You tell it how many of your most frequently posted to categories you want it to show and it will display an unordered list of those categories. It is based off of the Popular Tags plugin by Theron Parlin which was based on the weighted categories plugin by Matt Kingston. Unlike either of those plugins I do not display a tag cloud - but that might be a good option so that this one plugin is a bit more flexible. […]

  20. Robin March 18th, 2006 at 8:58 am | Permalink

    I keep trying to insert the code into a page for my site but it’s not working. I took out the space between

  21. Colin April 25th, 2006 at 12:23 pm | Permalink

    Is there a way to show all tags whether they are popular or not? Id like to have a full listing of tags on my archive page.

  22. Amy May 6th, 2006 at 2:31 am | Permalink

    For some reason the last tag at end of popular tags seemed to have incorrect link to the proper permalink. How do I resolve this? The rest of popular tags are functioning correctly. I love popular tags!

  23. aleve May 17th, 2006 at 4:10 am | Permalink

    For you? Chloraform and strapping tape. Or a magazine. Go with the one without the federal charges.

  24. Kevin Severud May 17th, 2006 at 6:46 pm | Permalink

    Is there a way to prevent this plugin from finding posts that are published in the future?

  25. WP Heatmap y Popular Tags » La mate por un yogur May 18th, 2006 at 10:27 pm | Permalink

    […] Popular Tags Plugin no es más que una pequeña actualización del código original, similar a la que hizo Antonio meses despues, y que por ese mismo motivo tampoco funciona en la alpha de WP 2.1 (en la actual no existen problemas). Wordpress | Enlace permanente # | Menéame […]

  26. adam June 3rd, 2006 at 11:55 pm | Permalink

    it works, and it works well.thank you very much.

  27. jimbox July 2nd, 2006 at 11:21 am | Permalink

    having trouble getting wp2.0.2 to recognize it. i’m new to wp and this would seem to be a problem w/ my use of wp- but i can get other plugins to work just by copying them into the wp-content/plugins dir.

    i can’t activate this plugin as it doesnt show up in my wp management console. i’ve checked the popular_tags file’s header and all seems fine. i’ve even manually created my own header to see if wp would pick it up. php tags seem file too… opening just as there should be.

    even if there was a problem w/ the plugin code- why wont wp recognize it and show it under Plugin Managment??

    any suggestions?
    tia!

  28. jimbox July 2nd, 2006 at 11:13 pm | Permalink

    oops- found my problem. the link above downloads with the file extension .phps

    the extra ’s’ screwed me up. i never noticed the mispelling. once i removed the ’s’ wp recognized it and installed perfectly.

    thanks!
    (and correct the name in the link above :)

  29. supamello July 10th, 2006 at 5:06 am | Permalink

    To fix the last link not working do the following:

    Look at the output of list_cats() - it includes a newline at the end of the output, which then messes up the first foreach loop.

    Change:
    $cats = list_cats(1, ‘all’, ‘name’, ‘asc’, ‘’, 0, 0, 1, 1, 0, 1, 1, 0, 1, ‘’, ‘’, $exclude, 0);

    to

    $cats = trim(list_cats(1, ‘all’, ‘name’, ‘asc’, ‘’, 0, 0, 1, 1, 0, 1, 1, 0, 1, ‘’, ‘’, $exclude, 0));

    The problem should be solved

    ZAK posted this fix on hitormiss.org

  30. FrenchStudio blog » Les plugins du blog FrenchStudio August 31st, 2006 at 3:43 pm | Permalink

    […] Popular tags : les catégories en sidebar en différente taille […]

  31. PunkArtBlog » Blog Archive » Plugins wordpress du PunkArtBlog November 29th, 2006 at 11:05 am | Permalink

    […] Popular Tag: remplace la barre des catégories par un nuage contenant les différentes catégories, celle ci devenant de plus en plus grosses en fonctions du nombre d’articles posté dedans. […]

  32. PunkArtBlog » Blog Archive » Plugins wordpress du PunkArtBlog: +1, -1 November 29th, 2006 at 12:36 pm | Permalink

    […] J’ai également rajouté un plug-in: Popular Tag, qui remplace la barre des catégories par un nuage contenant les différentes catégories, celle ci devenant de plus en plus grosses en fonctions du nombre d’articles posté dedans. […]

  33. raincontreras.com » WordPress 2.1 Upgrade: DONE January 23rd, 2007 at 3:55 am | Permalink

    […] Finished upgrading to WordPress 2.1, with one minor problem that I will try to resolve later. This involves ‘popular tags‘. […]

  34. deep|edition » Mina WP-plugins January 27th, 2007 at 3:32 pm | Permalink

    […] förutom ovan: NoFollow 0.02a En gammal plug som automatiskt skapar ett “_nofollow” för alla länkar. Top Categories 1.0 visar hur många postningar som finns i varje kategori. Ubernyms 2.6 En lysande funktion som innebär att de förkortningar, ord och liknande automatiskt ges definitioner, länkas automatiskt etc. […]

  35. Iulian February 25th, 2007 at 5:13 am | Permalink

    Nice job!!

  36. free voyeur movie March 25th, 2007 at 7:58 am | Permalink

    free voyeur movie…

    free voyeur movie moves…

  37. sexy chicks March 30th, 2007 at 10:09 pm | Permalink

    sexy chicks…

    Research about sexy chicks….

  38. Tests WordPress » Popular Tags + Ultimate Tag Warrior April 10th, 2007 at 11:10 am | Permalink

    […] popular-tags-plugin Attention:  renommer le fichier de popular tags en .php […]

  39. chrysler dodge grapevine jeep May 8th, 2007 at 8:15 pm | Permalink

    chrysler dodge grapevine jeep…

    ha-rd-po-rn-fu-ck 802930 The chrysler dodge grapevine jeep…

  40. man o war May 30th, 2007 at 2:42 pm | Permalink

    man o war…

    Aggregator of man o war sites…

  41. cerritos college May 31st, 2007 at 4:07 pm | Permalink

    cerritos college…

    cerritos college info and more…

  42. nude art young June 7th, 2007 at 12:53 pm | Permalink

    nude art young…

    ka-ka-sh-ka 802930 homepage of nude art young…

  43. Arkansassite.Info June 23rd, 2007 at 11:29 pm | Permalink

    Arkansassite…

    First-class tv internet design….

  44. canyou123.com June 24th, 2007 at 1:01 am | Permalink

    canyou123…

    Outstanding multimedia.phenomenal health news….

  45. WP Plugins DB » Plugin Details » Popular Tags July 9th, 2007 at 4:37 am | Permalink

    […] Visit […]

  46. EPS STYROPOR November 4th, 2007 at 5:31 pm | Permalink

    Firmamız EPS imalatı ve strafor makinaları ile ilgili çeşitli tip üretim şekilleri konusunda hizmet vermektedir; EPS, ambalaj üretim tesisleri, EPS Bardak ve Tabak, Enjeksiyon Makinaları, Blok Makinaları, Şişirme Makinaları, strafor izolasyon, Kurutucular, Kesme akinaları,
    EPS Karışım Ünitesi, Geri Dönüşüm Makinaları, Silo Sistemleri, Ambalaj Makinaları


Leave a Reply

This entry was posted on Saturday, July 9th, 2005 at 10:00 pm. You can follow any responses to this entry through the RSS 2.0 feed. If you're wondering how to get your own icon next to your comment, go visit gravatar.com and get yourself hooked up.