Multicolumn Category Widget

The widget to display categories in WordPress lists categories only in one column (as of version 4.3). However in many cases there would be enough room to split the list into two or more columns.

The “Multicolumn Category Widget” allows to display the top level categories in multiple columns.

Installation

Manually

The manual installation consists of three steps:

  1. Download the package from http://wordpress.org/plugins/multicolumn-category-widget/
  2. Unpack the content to the directory wp-content/plugins of your own WordPress installation so the plugin will finally be at wp-content/plugins/multicolumn-category-widget.
  3. Activate the plugin in the backend.

Using the WordPress repository

You may also install the plugin using the plugin manager in the WordPress backend. Use the title “Multicolumn Category Widget” to find the plugin in the online repository. WordPress will also notify you about updates.

Use

Like any widget you can add the Multicolumn Category Widget to existing sidebars. You can also enter a custom title and change the number of columns.

Multicolumn Category Widget, backend

If there is no title set the heading “Categories” will automatically be used. The number of columns can also be reduced to 1 if you don’t want to have a multicolumn display.

When the option “Show post counts” is active, the number of posts for each category will be displayed in brackets behind the category title.

Customizing the layout

The widget uses its own stylesheet which can be found in css/frontend.css. Here the styles are defined for the first and the last column and every other column in between:

.widget_multicolumncategorywidget ul.mccw-col-first {
    display:inline-block;
    vertical-align:top;
    padding-right:2em;
}
.widget_multicolumncategorywidget ul.mccw-col {
    display:inline-block;
    vertical-align:top;
    padding-right:2em;
}
.widget_multicolumncategorywidget ul.mccw-col-last {
    display:inline-block;
    vertical-align:top;
}

The distance between the columns is defined by padding-right:2em;. To avoid an unneccessary margin at the right border of the list, the last column will be formatted without this attribute using the class mccw-col-last.

Additionally you can optionally give every column its own style. For this you have to define the classes according to the scheme as shown above but using the name mccw-col-n, where n is the number of the column, for example for the second column:

.widget_multicolumncategorywidget ul.mccw-col-2 {
    /* Customizations for the second column here */
}

For the post counts there is also a style which can be customized if needed:

.widget_multicolumncategorywidget .postcount {
    font-style:italic;
}

Adding additional languages

Currently (as of version 1.0.13) the languages German, English, Italian and Russian are supported.

If you want to add additional languages you can use  “Loco Translate”. The language files are in the folder languages. For English there is no file neccessary.

If you’d like your translation to be included in the next update, feel free to send me the respective po/mo files.