Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.3   Updated Saturday, September 29th, 2007 at 3:15pm

Multi Column Category List Plugin for WordPress

This plugin generates an alphabetical listing of your WordPress categories in multiple columns. You can choose the number of columns to display, with an option to split up the list of categories by letter. It also supports the use of a custom header to help separate the categories. For example, you could have it say ‘Topics: A’ and then list the topics that start with ‘A’, etc. The category list can easily be added to any post or page with the trigger text, or called directly from a template file. A CSS file is also included for easy style changes.

Related Plugins

There is also a plugin available to generate a multi-column list of your WordPress links.

Download

Installation

  • Download the above file and uncompress
  • Upload dd-multi-col-cats.php to your plugins directory
  • Upload dd-multi-col-cats.css to your theme directory
  • Activate the plugin from the WordPress admin panel
  • Configure the options under the admin panel: Options - DDMultiColCats

Usage

To use this plugin, simply add the following trigger text to a post or page:

<!-- multicolcats -->

If you prefer, you can also call the function directly from a template file with the following command:

<?php echo ddmcc_generate(); ?>

Change Log

  • 09-29-07 Version 1.3 - Updated for WordPress 2.3. Added ‘Load Default Options’ button. Removed javascript expand code because it was too buggy.
  • 05-16-07 Version 1.2 - Updated for WordPress 2.2.
  • 03-02-07 Version 1.1 - Option added to allow click-to-expand lists. Special thanks to Richard K Miller for submitting the code!
  • 02-03-07 Version 1.0 - First release.

Options

Here are the options available for this plugin under the WordPress admin panel

Number of columns

The number of columns that the categories will be shown in. If you want to show more columns than your layout width will handle, you can adjust the width of each column in the CSS file.

Separate items

Here you can choose to separate the categories by letter, with a custom separation header, or no separation at all.

Separation header

If the separation option is enabled, this is where you enter your separation text, which will be shown above each set of items. You can use %L to show the letter. For example, if you enter Topics: %L then it will show Topics: A, (list of cats), Topics: B, (list of cats), etc…

Excluded categories

This is a comma-separated list of the category IDs you want to exclude from the list.

  1. DD it would be really great if it were possible to show category and subcatgories as well! I’ve been searching for this kind of feature for ages, just like in the babycenter site for example :
    http://www.babycenter.com/baby?intcmp=Nav_Global_Baby_v3
    Anyway, thank you so much for all those great plugins :)

  2. This is an extremely handy plugin. Thank you very much. You should consider making this into a widget since many people are going to use this in their sidebar.

  3. When I attempt to change the number of columns, I receive the following error:

    Fatal error: Cannot redeclare ddmcc_add_option_pages() (previously declared in D:\Inetpub\jonathangriffith\wp-content\plugins\dd-multi-col-cats.php:21) in D:\Inetpub\jonathangriffith\wp-content\plugins\dd-multi-col-cats.php on line 24

    Any idea?

  4. Would there be a way to adapt this for tags?

  5. Is there a way to use this plug-in for pages.

  6. 40
    justagirl

    I saw this asked in comment #27, but didn’t find an answer… is there a way to edit the code so that the number of posts per catagory is displayed to the right of the catagory name? A “find/replace” type of answer would be greatly appreciated! Otherwise, this plugin is EXACTLY what I needed. Thanks for offering it! =)

  7. See those two commands? I tried using them both with the links template. I tried using the multicolcats one with archives template. no attempt worked.

    I uploaded the plugins to the plugin directory, I uploaded the CSS files to the theme directory, didn’t work. I am not a happy camper. You need to write complete instructions, and I do mean complete. And that includes the Sandbox theme and any design for same.

  8. You use this with which page template? It is necessary information.

  9. This is a cool plugin - I am using it on my site, but I have a question…some of my categories start with a number, so does anyone know how to get numbers included along with A,B,C,D etc…?

    Any tips would be much appreciated - cheers everyone!

  10. 36
    Kasper

    The comma separated excludes doesn’t work! I did this:
    // Set defaults if options do not exist
    add_option(’ddmcc_num_cols’, 2);
    add_option(’ddmcc_sep’, ‘header’);
    add_option(’ddmcc_sep_header’, ‘%L’);
    add_option(’ddmcc_exclude’, ‘1′);

  11. Wondering if it could be modified to include only 1 specific category?

  12. Hi, again would really love if we have an option to display/not display the “cat description” for each category (cuz the SE isn’t too fondly of a page with tons of links =).

  13. Would love to have this type of code to display posts alphabetically. What’s the chances of getting this type of simple code for a page.

  14. I have to You a strange question: In which application You made logo degondesign. Thamk’s for answer.

  15. This plugin help my order my comments. He is great. Thank’s

  16. Cool plugin, i am going to install on my blog now.

  17. Version 1.3 Released

    This version adds support for WordPress 2.3, and a ‘Load Default Options’ button has been added to the options page. The Javascript (click to expand) feature has been removed, due to problems with it.

  18. i have been looking for something like this for a long time! thanks for this wonderful code

  19. 27
    MFrazier

    I love this plug-in, but I am curious how I would edit it to output the number of posts in that category to the right of the category name.

    any ideas?

  20. This plugin looks perfect for something my dad’s been asking for on the website I manage for him… but I’m having a problem with it. I installed the plugin and configured options as instructed above, and then created a page containing just <!-- multicolcats -->. When I view the page, the list appears for a split second and then vanishes. I have no idea what would make that happen — can you help? The URL is http://www.familypoet.com/poems-by-category/ - thanks!

  21. WordPress database error: [Can't find FULLTEXT index matching the column list]
    Hi,
    First I want to thanks for this nice nice plugins

    But I got onje problem in my blog.
    I got this error :-

    SELECT ID, post_title, post_content,MATCH (post_name, post_content) AGAINST (’blode 134′) AS score FROM wp_posts WHERE MATCH (post_name, post_content) AGAINST (’blode 134′) AND post_date

  22. Wow! Here’s the script I’ve been looking for in your sitemap generator although it would be nice if the categories can be arranged exactly as they can be in the sitemap generator instead of alphabetically.

    Like:
    Category A
    – Subcategory1
    – Subcategory2
    Category B
    – Subcategory1
    – Subcategory2

    This is pretty nifty, though. Great work!

  23. Thank you so much for creating this! I tried to do this on my own, and it just wasn’t working out right. This plugin lets me do exactly what I wanted!

  24. we have an working example running on http://www.cmssolutions.nl
    Feel free to have a look at the way it is integrated.

  25. Can anyone offer an example of this in action?

  26. 20
    kate

    Of course I meant to ask the previous question under the multi column Link List Plugin. Sorry.

  27. 19
    kate

    Hi,

    Nice idea!
    Do you know how i could do the same thing with posts rather than links?

    Thank you!
    Kate

  28. Thanks for the cool plugin

  29. 17
    Michael

    Nevermind. Got it to work. Nice plugin.

  30. 16
    Michael

    Would it be difficult to modify this to pull in category descriptions under the category names? This is something of a big shortcoming in WP, IMHO.

  31. Chris: It cannot do that currently.

    Spencer: You can add extra code at the end of the plugin output by appending it to the $t_out variable, which is returned in the function which generates the output.

  32. 14
    Chris

    Love the plug-in, exactly what I needed. Is their a way to display sub-categories under their parents? thanks

  33. This is an extremely handy plugin. Thank you very much. You should consider making this into a widget since many people are going to use this in their sidebar. I took a crack at it but failed.

    Also, I seem to be having an issue with clearing when using this. It is obviously my markup that is causing the problem, but if you have any info on how or where a clearing div should be added, I would appreciate it.

    Thanks again.

  34. [...] Multi Column Category list Plugin for Wordpress This plugin generates an alphabetical listing of your WordPress categories in multiple columns. [...]

  35. [...] Multi Column Category List genera una lista alfabetica delle vostre categorie wordpress, su più colonne. Il numero di colonne si può scegliere, e un’altra opzione permette di mettere in testa una categoria preferita. Compatibile con Wordpress 2.1, non testato con altre versioni. [...]

  36. Matt: Thanks for the new plugin - I’m excited to try it out. You plugin creators are the best!

  37. I just added a plugin which displays links in multiple categories as well. You can find a link to it at the top of this article under ‘Related Plugins’ :)

  38. I, too, have just a few categories, but many links and categories of links. I use a plugin now, but it gives me a very, very long single-column list… and it keeps growing! So a dd-multi-col-links plugin would be really useful. Your site mapping plugin is great!
    Many thanks.

  39. Miriam: Glad you like it. Categories and links are handled a bit differently, but it would be possible to make a plugin to do the same with links for sure. I will keep it in mind :)

  40. Would it be possible to hack this so that it applies to links (i.e. the blogroll) instead of categories? I tend to have more links than categories on my blogs, and it would be helpful to the readers if I could easily put them in columns. Anyways, this is a great plugin!

  41. [...] Multi Column Category List Plugin for WordPress This plugin generates an alphabetical listing of your WordPress categories in multiple columns. You can choose the number of columns to display, with an option to split up the list of categories by letter. (tags: wordpress plugin wp-plugins) [...]

  42. Thomas: Actually I do not, since I do not have that big of a category list and it would not show it off very well.

    If anyone out there is using this plugin, and would like a link to their site from this one (to act as a demo) let me know! :)

  43. Look’s like a great plugin. Do you have a live preview on your site somewhere?

  44. jochen: You upload it to the dir of the theme you are using.

  45. Hi,
    do i have to upload th css into the theme dir or into the the theme for example /classic?

    Jochen

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.