Elliott C. Back: Internet & Technology

Heavyweight Categories

Posted in Plugins by Elliott Back on January 18th, 2005.

Matt Kingston of www.hitormiss.org/ originally wrote a plugin for Wordpress he called Weighted Categories List. However, it didn’t appear to work “out of the box,” so I’ve rewritten some small parts of it. It should work properly now. You can see a live demo on the archives page.

Introduction:

Heavyweight Categories is a Wordpress plugin for WP 1.2 that displays categories in a flickr-style format where more popular categories on your blog are tagged with bigger tags.

Download:

You can download Heavyweight Categories from the plugins repository. Just copy and paste the php code from heavyweight-categories.php into a new .php file, move it to your wp-content/plugins/ directory, and activate it in the administrative interface.

Instructions:

Place the php call < ?php heavyweight_categories(); ?> anywhere in your template to show the weighted categories list. The arguments to the function are: {$smallest=10, $largest=48, $unit=”pt”, $exclude=”}, in that order. Smallest is the smallest possible font size, largest is the largest, unit specifies the font unit, and exclude is an array of the categories or a single category to exclude. So, to draw the categories between font size 10 and 20px, excluding category number 12, you would write < ?php heavyweight_categories(10, 20, 'px', 12); ?>

This entry was posted on Tuesday, January 18th, 2005 at 7:50 am and is tagged with interface instructions, hitormiss, administrative interface, category number, page introduction, style format, php file, php code, wordpress plugin, repository, kingston, array, demo, blog. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

3 Responses to “Heavyweight Categories”

  1. [...] ft interview tales. Now, take a look at what I get back with LSI: Google Desktop Search, Heavyweight Categories plugin, and Things I want to do for Wordpress. Thes [...]

  2. nelson says:

    it is not working to meeeeee

    sop sop sop .. is the code updated for the latest WP version???

  3. Brian says:

    Thanks for the fix. It’s working ok for me though I had to exclude any categories with a number for a name as it read that I had 2006 entries with the tag “2006″ on them! Otherwise works great, thanks!

Leave a Reply

Powered by WP Hashcash