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 Friday, February 20th, 2009 at 7:19pm

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

  If you have found this page useful, please consider donating. Thanks!

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.

Pages: « 9 8 [7] 6 5 4 3 2 1 » Show All

  1. thanks a buch!! is it possible to prevent displaying the same letter continued on the next column?

  2. 104
    mark

    Hello and thanks for the great plugin.. Is there a way to add code to where the plugin will ALSO show links to all the posts UNDER each of the categories? Maybe with each post being indented with a ?

    Mark

  3. 103
    Matthew

    Can this plugin be configured or updated to list tags in a multi-column layout?

  4. 102
    guest

    Hi, I was just wondering – is it possible to use two instances of this plugin with different options set for each instance?

  5. Okay, is seems good

  6. 100
    Dennis

    Hello, I’ve seen websites using something like What is that?

  7. Is there any way to use this plugin to display pages instead of links or is there a way to use the site map plugin, but display in columns? I read through all the comments and it doesn’t look like it was answered…

    Any help?

  8. For those wanting this plugin to display header numbers as well as letters. We have modded the code. Please be aware that this will require CSS for styling. Just change lines 221 – 259 to the following:

    
    LINE: 221
    VERSION: 1.3
    
    for ($c = $start_cat; $c < $end_cat; $c++) {
    
    			if ($sep != 'no') {
    
    				if ((strtoupper($cat_list[$c]->cat_name[0]) != $last_char)) {
    
    					$last_char = strtoupper($cat_list[$c]->cat_name[0]);
    
    					if ($sep_header != "") {
    						if ($sep == 'header') {
    							$tmp_header = str_replace("%L", strtoupper($last_char), $sep_header);
    							if (!$first_item) {
    								$t_out .= "";
    							}
    							$t_out .= '<p class="sep">' . stripslashes($tmp_header) . '</p>';
    						} 
    					} else {
    						if ($first_item) {
    							$first_item = FALSE;
    						} else {
    							$t_out .= '<p class="sep">&nbsp;</p>' . "\n";
    						}
    					}
    
    				}
    
    			}
    
    			$t_out .= '<li><a href="' . get_category_link($cat_list[$c]->cat_ID) . '">' . $cat_list[$c]->cat_name . '</a></li>' . "\n";
    
    			if ($first_item) {
    				$first_item = FALSE;
    			}
    
    		}
    
    		$t_out .= "\n</div>";
    
    	}

  9. FIXED CODE:

    copy and replace the whole item as specified and then just delete the {- rel=”nofollow} section in the second statement. everything works fine!

    check it out:

    http://www.ttmyt.com
    http://www.thoughtsthatmakeyouthink.com

  10. to the admin:

    I tried to use your code in the file, but i keep getting an error when i save and load in a browser… can you help?

    $tmpcat = get_categories (‘include=’ . $cat_list[$c]->cat_ID);
    $numposts = $tmpcat[0]->category_count;

    $t_out .= ‘cat_ID) . ‘”>’ .
    $cat_list[$c]->cat_name . ‘
    (‘ . $numposts . ‘) ‘ . “\n”;

    doesn’t work? syntex? missing something? spacing wrong? i give up after 1 hour!

  11. 95
    Pete

    I’d like to use this but within a widget. How can I do that?

  12. Like Theirs No (. or numbers) and i want it to be able to scroll down to the alpahbet wen i click E it should go to E and so on….

  13. Uhm doods Can you like Add The Older Version of this plugin…

    Or Can You Tell me Whats Wrong With The Plugin Here Check it out!

    http://anime-exceed.com/anime-list/

  14. 92
    mushtaq

    Hi
    1st of all Thanks for the wonderful plugin.
    next is how do i add post count in front or each category linke
    uncategorized(2)

    Thanks a lot if u can help me out.

  15. Hello,
    I find no demo of this plugin. Surprising?, can you post at least one link where we can see what the plugin does?

Pages: « 9 8 [7] 6 5 4 3 2 1 » Show All

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.