Collapsing Categories
Adds a widget which uses Javascript to dynamically expand or collapse the set of posts for each category.
Mit Vorsicht verwenden
Collapsing Categories works, but test it on a staging site before relying on it in 2026. It runs on 4K+ sites, is rated 4.1/5 and was last updated 10 months ago, and scores 46/100 on our health check.
- Momentum — downloads up 19.4% vs the previous 30 days
- Nur getestet bis WordPress 6.9 (letzt ist 7.1)
Wie stapelt es sich?
Side-by-side bei Installationen, Updates, Bewertungen und SupportTägliche Downloads
Download-Spitzen folgen normalerweise einer neuen Version - jede Website, die automatisch aktualisiert wird, gilt als Download.
Ranglisten
Where Collapsing Categories stands todayWordPress.org Ranglisten suchen
Live-Position in der Plugin-Suche, Top 100| Stichwort | Position |
|---|---|
| categories | #18 |
| navigation | >100 |
| sidebar | >100 |
| widget | >100 |
Versionsübernahme
Anteil aktiver Sites pro Release.
Bewertungsaufschlüsselung
★★★★★★★★★★ 4.1 from 57 reviews
About Collapsing Categories
From the official readme · v3.0.12Beschreibung
Collapsing Categories creates an expandable list of categories and
subcategories. It can also expand to show posts. The primary usage is as a
widget, but you can also use the code in your theme manually if you wish (see
installation instructions)
Optionen
Options can be set
from the block panel. If you wish to insert the code into your theme manually
instead of using a widget, you can use the following options. These options
can be given to the collapsCat() function either as an array or in query
style, in the same manner as the wp_list_categories function.
$defaults=array(
'showPostCount' => true,
'inExclude' => 'exclude',
'inExcludeCats' => '',
'showPosts' => true,
'showPages' => false,
'linkToCat' => true,
'olderThan' => 0,
'excludeAll' => '0',
'catSortOrder' => 'ASC',
'catSort' => 'catName',
'postSortOrder' => 'ASC',
'postSort' => 'postTitle',
'expand' => '0',
'defaultExpand' => '',
'postTitleLength' => 0,
'accordion' => 0,
'catfeed' => 'none',
'taxonomy' => 'category',
'showPostDate' => false,
'postDateAppend' => 'after',
'postDateFormat' => 'm/d',
'useCookies' => true,
'showTopLevel' => true,
'postsBeforeCats' => false,
'expandCatPost' => true,
'debug'=>'0'
);
- inExclude
- Whether to include or exclude certain categories
- ‘exclude’ (default)
- ‘include’
- Whether to include or exclude certain categories
- inExcludeCats
- The categories which should be included or excluded
- showPages
- Whether or not to include pages as well as posts. Default if false
- linkToCat
- 1 (true), clicking on a category title will link to the category archive (default)
- 0 (false), clicking on a category title expands and collapses
- catSort
- How to sort the categorys. Possible values:
- ‘catName’ the title of the category (default)
- ‘catId’ the Id of the category
- ‘catSlug’ the url of the category
- ‘catCount’ the number of posts in the category
- ‘catOrder’ custom order specified in the categorys settings
- How to sort the categorys. Possible values:
- catSortOrder
- Whether categories should be sorted in normal or reverse
order. Possible values:- ‘ASC’ normal order (a-z 0-9) (default)
- ‘DESC’ reverse order (z-a 9-0)
- Whether categories should be sorted in normal or reverse
- postSort
- How to sort the posts. Possible values:
- ‘postDate’ the date of the post (default)
- ‘postId’ the Id of the post
- ‘postTitle’ the title of the post
- ‘postComment’ the number of comments on the post
- ‘postOrder’ sort by menu order
- How to sort the posts. Possible values:
- postSortOrder
- Whether post should be sorted in normal or reverse
order. Possible values:- ‘ASC’ normal order (a-z 0-9) (default)
- ‘DESC’ reverse order (z-a 9-0)
- Whether post should be sorted in normal or reverse
- expand
- The symbols to be used to mark expanding and collapsing. Possible values:
- ‘0’ Triangles (default)
- ‘1’ + –
- ‘2’ [+] [-]
- ‘3’ images (you can upload your own if you wish)
- ‘4’ custom symbols
- The symbols to be used to mark expanding and collapsing. Possible values:
- customExpand
- If you have selected ‘4’ for the expand option, this character will be
used to mark expandable link categories
- If you have selected ‘4’ for the expand option, this character will be
- customCollapse
- If you have selected ‘4’ for the expand option, this character will be
used to mark collapsible link categories
- If you have selected ‘4’ for the expand option, this character will be
- postTitleLength
- Truncate post titles to this number of characters (default: 0 = don’t
truncate)
- Truncate post titles to this number of characters (default: 0 = don’t
- accordion
- When set to true, expanding one category closes all others at that level
- catfeed
- Whether to add a link to the rss feed for a category. Possible values:
- ‘none’ (default)
- ‘text’ shows RSS
- ‘image’ shows an RSS icon
- Whether to add a link to the rss feed for a category. Possible values:
- taxonomy
- Type of taxonmy to display. Possible values:
- ‘category’ (default)
- ‘link_category’
- ‘post_tag’
- ‘both’ (categories and tags)
- any other registered taxononmy (e.g. recipe press uses recipe-categories)
- Type of taxonmy to display. Possible values:
- showPostDate
- When true, show the date of each post
- postDateAppend
- Show the date before or after the post title. Possible values:
- ‘after’ (default)
- ‘before’
- Show the date before or after the post title. Possible values:
- postDateFormat
- What format the post date is in. This uses the standard php date
formatting codes
- What format the post date is in. This uses the standard php date
- useCookies
- When true, expanding and collapsing of categories is remembered for each
visitor. When false, categories are always display collapsed (unless
explicitly set to auto-expand). Possible values:- 1 (true) (default)
- 0 (false)
- When true, expanding and collapsing of categories is remembered for each
- showTopLevel
- When set to false, the top level category will not be shown. This could
be useful if you only want to show subcategories from one particular
top-level category- 1 (true) (default)
- 0 (false)
- When set to false, the top level category will not be shown. This could
- postsBeforeCats
- When set to true, posts in category X will be ordered before
subcategories of category X- 1 (true)
- 0 (false) (default)
- When set to true, posts in category X will be ordered before
- expandCatPost
- When set to true, any category to which a post is assigned will
automatically be expanded on a single post page.- 1 (true) (default)
- 0 (false)
- When set to true, any category to which a post is assigned will
- showEmptyCat
- When set to true, empty categories are shown
- 0 (false) (default)
- 1 (true)
- When set to true, empty categories are shown
- debug
- When set to true, extra debugging information will be displayed in the
underlying code of your page (but not visible from the browser). Use
this option if you are having problems
- When set to true, extra debugging information will be displayed in the
Beispiele
collapsCat('catSort=ASC&expand=3&inExcludeCats=general,uncategorized')
This will produce a list with:
* categories shown in alphabetical order
* using images to mark collapsing and expanding
* exclude posts from the categories general and uncategorized
`
<?php
echo '
- ‘ . “\n”;
if (function_exists(‘collapsCat’)) {
collapsCat(array(
‘postSort’ => ‘postDate’,
‘postSortOrder’ => ‘DESC’,
) );
} else {
wp_get_categories(‘your_options_here’);
}
echo “
\n”;
?>
`
Demo
I use this plugin in my blog at http://robfelty.com
CAVEAT
Currently this plugin relies on Javascript to expand and collapse the links.
If a user’s browser doesn’t support javascript they won’t see the links to the
posts, but the links to the categories will still work (which is the default
behavior in wordpress anyways)
Installation
IMPORTANT!
Please deactivate before upgrading, then re-activate the plugin.
Unpackage contents to wp-content/plugins/ so that the files are in a
collapsing-categories directory.
Widget installation
Activate the plugin, then simply go the
Presentation > Widgets section and drag over the Collapsing Categories Widget.
Manuelle Installation
Activate the plugin, then insert the following into your template: (probably
in sidebar.php). See the Options section for more information on specifying
options.
<?php
echo "<ul class='collapsCatList'>\n";
if (function_exists('collapsCat')) {
collapsCat();
} else {
wp_get_categories('your_options_here');
}
echo "</ul>\n";
?>
Änderungsprotokoll
3.0.12 (2026.02.05)
- Fixed possible SQL injection
3.0.11 (2025.05.1)
- Fixed PHP warnings
3.0.10 (2025.04.30)
- Fixed issue with activating the plugin
3.0.9 (2024.12.16)
- Cleaned up some obsolete code
- Removed REST API
- Fixed security issue which could allow users using the REST API to inject
SQL
3.0.8 (2023.12.01)
- Updated deprecated
__experimentalGrouptogroup - Compatible with WordPress 6.4.1
- Got rid of some warning messages
3.0.7 (2023.10.10)
- Fixed another issue with subcategory only option (Again, Thanks Boris for testing)
Für Entwickler
Ist das dein Plugin? Zeigen Sie die Zahlen.
Fügen Sie Ihrer Website, Docs oder GitHub Readme ein Live-Badge hinzu. Es wird von selbst aktualisiert - kein Konto erforderlich.
Best Collapsing Categories alternatives
All categories plugins →Fragen und Antworten
Collapsing Categories: quick answers
Gerade Antworten, gezogen von Live WordPress.org Daten.
Quelle: WordPress.org
Is Collapsing Categories free?
Yes. Collapsing Categories is free to download and use from the official WordPress.org plugin directory.
Is Collapsing Categories safe to use in 2026?
Collapsing Categories works, but test it on a staging site before relying on it in 2026. It runs on 4K+ sites, is rated 4.1/5 and was last updated 10 months ago, and scores 46/100 on our health check.
How many websites use Collapsing Categories?
Collapsing Categories is active on 4K+ WordPress websites and has been downloaded 297,497 times since it launched in January 2008. It was downloaded 983 times in the last 30 days.
Does Collapsing Categories work with WordPress 7.1?
Collapsing Categories is officially tested up to WordPress 6.9.12, while the latest release is 7.1.5. It may still work, but try it on a staging site first.
When was Collapsing Categories last updated?
The latest version, 3.0.12, was released on February 12, 2026 (10 months ago).
Who makes Collapsing Categories?
Collapsing Categories is developed and maintained by robfelty.
What are the best alternatives to Collapsing Categories?
The most popular alternatives to Collapsing Categories are List category posts (70K+ installs), Media Library Assistant (70K+ installs) and PublishPress Taxonomies (40K+ installs).
Angetrieben von PageForge
Eine Vorlage und eine Tabelle. Eine echte Seite für jede Suche.
PageForge Verwandelt jede Zeile eines CSV in eine WordPress-Seite mit eigenem Titel, URL, SEO Felder und Schema entworfen. Kostenlos auf WordPress.org.
- CSV und XLSX, plus Google Sheets auf Beruf und Unternehmen
- seinen eigenen Titel, URL, SEO Felder und Schema für jede Seite
- Arbeitet mit dem Blockeditor, Elementor, Divi und Avada
- Kostenlos auf WordPress.org, keine Kreditkarte


