Collapse-O-Matic adds an [expand title="trigger text"]hidden content[/expand] shortcode that will wrap any content, including other shortcodes, into a lovely jQuery expanding and collapsing div. A complete listing of shortcode options and attribute demos are available, as well as free community support.


  • Hmmm... wonder what happens this text by that arrow is clicked?
  • Holy Crap! That other text just showed up like magic! Thank you Collapse-O-Matic!
  • Options Page? Yes, Options Page!


  1. Old-school: upload the collapse-o-matic folder to the /wp-content/plug-ins/ directory via FTP. Hipster: Ironically add collapse-o-matic via the WordPress Plug-ins menu.
  2. Activate the Plug-in
  3. Add a the shortcode to your post like so: [expand title="Displayed Title Goes Here"]Hidden content goes here[/expand]
  4. Test that the this plug-in meets your demanding needs.
  5. Tweak the CSS to match your flavour.
  6. Rate the plug-in and verify if it works at
  7. Leave a comment regarding bugs, feature request, cocktail recipes at


Installation Instructions
  1. Old-school: upload the collapse-o-matic folder to the /wp-content/plug-ins/ directory via FTP. Hipster: Ironically add collapse-o-matic via the WordPress Plug-ins menu.
  2. Activate the Plug-in
  3. Add a the shortcode to your post like so: [expand title="Displayed Title Goes Here"]Hidden content goes here[/expand]
  4. Test that the this plug-in meets your demanding needs.
  5. Tweak the CSS to match your flavour.
  6. Rate the plug-in and verify if it works at
  7. Leave a comment regarding bugs, feature request, cocktail recipes at
Where can I translate this plugin into my favourite language?

Community translation for Collapse-O-Matic is available via the WordPress Translation project.

I am a Social Netwookiee, might Twinpictures have a Facebook page?

Yes, yes… Twinpictures is on Facebook.

Does Twinpictures do the Twitter?

Ah yes! @Twinpictures does the twitter tweeting around here.

How does one use the shortcode, exactly?

A complete listing of shortcode options has been provided to answer this exact question.

Is Galato the same as Ice Cream?

No. Not even close.


Brilliant plug in

Brilliant plugin. Solves a problem perfectly. Hard to understand all permutations initially but worth the effort.

Best plugin ever created

This plugin is absolutely fantastic. It’s very simple to use and works like magic. I also appreciate the fact that it’s very rich in options, so you can create any kind of collapse-and-expand section you can think of. And as if this wasn’t already enough, the free support blew me away. Amazing.

Great plugin, unhelfpul support.

Asked a simple question in the forums, the response was “already posted 1-2 years back, search in the forums.”

Searched the forums for multiple keywords for about 15 minutes and didn’t find anything regarding my question. And the support just marked it as “resolved”.

Awesome plugin and brilliant support!

This plugin is simply awesome! Easy to configure in any way you might imagine or require. It is a perfect fit for a one-page theme to keep uncluttered.

I’m using this plugin with a one-page theme Quill by aThemes. I have a lot of boring content (payments, shipping, terms, etc) on my one-page site ( and needed a sexy way to hide most of that content unless a user really wanted to view it.

I had an issue implementing a certain feature of the plugin with the top menu on my theme so I posted a topic on the support forum. The support I got was super responsive and top-notch! Turns out it was a minor theme compatibility issue, and the solution presented by the plugin author was simple and works perfectly!

I would highly recommend this plugin, especially to anyone looking to de-clutter their site and/or focus user attention on one or more particular sections of content.

Awesome Plugin

Great Function. very pleased with this layout. Did work for me even inside WPBakery composer/Visual composer

I am seriously folded

When I some years ago found the Collapse-O-Matic and could use it for texts in my blog notes it solved quite a lot of structural problems. It has been stable all the time, and I must say it really adds pleasure to my blogging. And hopefully for the readers too..

Here’s an example: (expanded for ten seconds after start)

Somewhat aside, but still in scope: I have programmed with folding editors since the late eighties. Up until I retired in June I used winf32 (a Windows editor), it took folding to a high level, where a fold is a first-rate citizen. Now that I program mostly in Eclipse-based XMOS xTIMEcomposer I miss that functionality. When it comes to code, not text per se, it’s about so much more than collapsing and expanding. But winf32 needed to be modernised. I have it for download at my home page, the code too, and I have written some about what it is and what I miss. If this is something that interests you (or the Collapse-O-Matic people) then it may be an interesting read. See (Disclaimer: my blog is just a hobby, no ads, no income, no gifts.. only expenses..) I’d be glad to help any who would want to make a winf32-type++ plugin for Eclipse/xTIMEcomposer

Read all 203 reviews

Contributors & Developers

“Collapse-O-Matic” is open source software. The following people have contributed to this plugin.


Translate “Collapse-O-Matic” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • touchstart binding now an option


  • added check for a callback function: colomat_callback on any expand element state change
  • added Initial Pause option to pause initial collapse of expand elements on page load
  • tabindex allows for a value of 0
  • if cid is provided and no cid exists, shortcode will return blank
  • added collapse-commander display id and title options for shortcodes
  • merged is_valid_jquery_selector function from csummer on github
  • added touchstart to click bindings
  • fully tested with WordPress 4.9.0


  • integrated collapse-commander expand templates
  • fully tested with WordPress 4.8.1


  • fully tested with WordPress 4.8


  • fixed issue with external triggers for nested elements
  • changed links to https
  • fully tested with WordPress 4.7.3


  • added effect and duration attributes and data-attributes
  • if duration is a number, string will be converted to integer
  • fully tested with WordPress 4.6


  • adjusted data-findme to deal with ‘auto’ value
  • added the must-be-one class to force one highlander element to stay open


  • integrated new collapse-commander image trigger feature
  • added new togglegroup shortcode attribute and data-togglegroup html attribute to reference groups of expand elements with out auto-collapsing other groups, such as when using the real attribute
  • added the ability to load plugin css only when shortcode is used
  • removed language files in favour of WordPress language packs
  • fully tested to work with WordPress 4.5


  • reworked the find-me feature to use new data-findme attribute, rather than create a hidden element.


  • renamed language files to xx_XX.po and
  • recreated the .pot file


  • hash-bang (#!) that are used in urls will not be processed as url anchors
  • now checks if a url anchor is actually an existing element before trying to process it
  • changed language domain to jquery-collapse-o-matic to work with WordPress’ new translation process
  • updated tested up to tag to 4.3.1


  • added map resize support for google maps builder


  • removed css that changed the display to block on focus


  • added css to remove the border on focus


  • added styles and jQuery for accessibility: focus/keyboard navigation


  • added catch-all callback for jetpack’s infinite-scroll
  • fix: XSS Vulnerability


  • fixed filter_content toggle bug.
  • even if content is not to be filtered, it will still be passed through do_shortcode function


  • added filter_content to the options page, defaults to off


  • added filter attribute to pass the content through the_content filter
  • changed name of wpex_clean_shortcodes function
  • tested up to: WordPress 4.2-alpha-31047


  • maptastic class only removed when present
  • maptastic has a max-width assigned to prevent content from entering display area.
  • updated collapse-commander integration to work with new licensing system
  • tested up to: WordPress 4.2-alpha-31047


  • added plugin to GitHub:
  • added new tabindex attribute to shortcode and options page
  • registration fields are masked using password input type


  • added shortcode and html support for the title, swaptitle, startwrap, enwrap and excerpt attributes using placeholders
  • added wpex_clean_shortcodes filter to strip unwanted p and br tags from the shortcode
  • added the ability to set trigclass, targtag and targclass attribute values in the plugin options page


  • added colomat-swap class to the swaptitle element
  • added optional cid default to the shortcode


  • fixed undeclared cid variable


  • fixed issue with using id anchor links on elements with expanded=‘true’
  • added support for Collapse Commander add-on plugin to manage expand elements


  • change the find me element from an anchor to an input due to HTML5 no longer supporting the Name attribute
  • fixed bug with trigpos inline
  • added span_fix classes to css files
  • added 4.0 icons to assets


  • fixed issue with missing classes in dark style
  • streamlined the collapse/expand function
  • streamlined the collapseall/expandall functions
  • added auto to scrollonclose attribute
  • added new colomat_expandall and colomat_collpaseall functions that can be triggered externally


  • load scripts only if shortcode is in use defaults to false – load all the time
  • added option to choose where all scripts will load: header or footer


  • option to only load scripts if shortcode is in use
  • script now loaded in footer
  • loading js and css now hooked to wp_enqueue_scripts rather than init
  • added Serbian language files courtesy of Borisa Djuraskovic from


  • fixed admin_init error


  • updated for 3.8
  • cleaned up old code


  • updated .on method
  • removed php4 constructor
  • added DE and RU languages


  • shortcode works in sidebar widgets (again)
  • fixed hasClass error in Slide Only animation option


  • find-me now is called only after collapse/expand animations
  • using .on() method once again
  • updated Requires at least tag to 3.3
  • added swapexcerpt
  • fixed typos on the options page
  • added custom css to options page
  • added targtag and targpos attributes
  • added the ability to insert extra external triggers


  • find-me auto feature improved to work with responsive websites


  • completely re-wrote plugin
  • added sweet-sweet options page
  • added colomat-expand-only class that forces collapse element to only open once and stay open
  • introduced Collapse-Pro-Matic for Premium Level Collapsing Action.
  • added scroll-to-trigger class for Internal Collapse Triggers
  • added livequery to bind collapse functions to dynamically added content
  • added callbacks: collapse_init(); and findme(); for dynamically added content
  • added language files for localization


  • added colomat-parent-highlight class functionality
  • moved findme auto calculations until after all images have loaded.
  • Added elwraptag and elwrapclass attributes
  • Added snap-shut class to slam collapse elements shut


  • Added colomat-nolink class for anchor tags to prevent auto-scrolling to anchor
  • bot- links for targets with swaptitle will now only swap out title for top trigger text


  • Replaced on() event handler back to click due to the WordPress world not quite ready for on(). People are still using jQuery 1.6.4 – can you believe that?!


  • Click events now use jQuery’s on() event handler for content that arrived dynamically via AJAX NOTE: plugin now requires jQuery version 1.7 or newer
  • added notitle attribute if no title should be displayed
  • added startwrap and enwrap attributes for wrapping titles
  • fixed bug when using nested close links and highlander grouping
  • added expandanchor to expand items from anchor links on the same page
  • added colomat-expand-only class to prevent collapse from trigger text
  • added scrollonclose attribute and scroll-to-trigger class to trigger auto-scroll to specific value on close.


Fixed auto-expand of urls with id-anchors


  • fixed JS error in 1.4.5 – GRRR


  • Added SlideFade/SlideToggle option
  • Visited trigers now have colomat-visited class


  • Minified javascript for faster page loads


  • Added the findme attribute to auto scroll to start of expanded items


  • Added speed adjustment to the slideToggle


  • Autoclose elements will now trigger SwapTitle


  • Relaunched of plugin page on Twinpictures’ Plugin Oven


  • Added alternate style sheet for sites with dark backgrounds.


  • Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.

  • Added noarrows class for better integration of images as triggers.


  • Bug Fix for the new trigpos attribute, stupid, stupid, stupid


  • Added trigpos attribute to position the trigger below the target.


  • Fixed the Enqueue error (thanks pborg & lancehudson)
  • Expand All and Collapse All will now also trigger swap titles
  • Added force_content_collapse class trigger to hide all targets w/o tirggers (roll-your-own)
  • Added content_collapse_wrapper class trigger that keeps targets hidden if no JavaScript is present.


  • Added the ability to place a second trigger link inside the expanding content area.


  • Added the ‘tracy patch’ that will collapse all nested items if the parent is collapsed via highlander grouping.


  • Added excerpt feature and all related attributes.


  • Swaptitle system rebuilt to support images and cufon.
  • Updated CSS the over generalized names close and hover to more plug-in specific colomat-close and colomat-hover
  • removed !important from CSS arrow definitions to make it easier to redefine arrows.


  • Swaptitle will not be triggered if either or tags are used in trigger titles
  • Added rel grouping to the collapse/expand-all triggers to target only elements of a single group.


  • Expand elements containing content with one empty space will no longer insert empty target elements.


  • Added expandsub1 – expandsub3 shortcodes for nested expand elements.
  • Added collapse/expand-all triggers.
  • Better looking 24bit arrows.


  • Plug-in now degrades gracefully if JS is disabled. Added swaptitle attribute to change the title on expand/collapse.


  • Random ID’s now start with letters, for valid xhtml.


  • Changed ‘-member’ to ‘-highlander’ because it sounds better.


  • Added the ability to have only one member of a group expanded by adding ‘-member’ to the rel attribute value.


  • Added Expanded attribute that sets the default position expanded open.
  • Added style that moves arrows to the right of the text.


  • Added the hover style to pimp the element style when moused over.


  • Added the rel attribute to deal with grouping collapse elements.
  • Added the trigclass and targclass attributes.
  • Added the alt attribute to define the title’s hover-over text.


  • Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
  • Style will support various element tags… span, div, h1, h2… etc.
  • Style separates the arrow icons, so there is no background bleed-over on extra-long trigger titles.


  • Optimized Code
  • Shortcode now works in Sidebar
  • Expand Titles now have title tags that match the title, not just some random number
  • Shortcode can include a user-defined ID instead of a generated random number
  • Added auto expand feature if an anchor tag is used in the URL


  • The plug-in came to be.