Collapse-O-Matic Expand Title with HTML Formatting

Here is a test with and expand and subexpand elements with html formatting in the Title Attribute:

[expand title="I am <b>bold</b>"]...[/expand]

I am bold
I am also bold
hey strong dude
I am italics
hey Italian dude
I am deleted
phone is ringing

However, this is not supported across all WordPress versions. Collapse-O-Matic version 1.3.6 offers some new placeholders to use as a work-around for WordPress installations that will not allow html in the title, swaptitle, startwrap, endwrap, excerpt and swapexcerpt attributes:
%(% = <
%)% = >
%{% = [
%}% = ]

[expand title="I am %(%b%)%bold%(%/b%)%"]...[/expand]

I am bold
Hidden Content

Collapse Commander

One benefit of using Collapse Commander is that all attributes are not processed through the shortcode attribute filters. This means that both HTML and Shortcodes are fully supported, without the need to further clutter the expand shortcode attributes with placeholders.

No need for placeholders with Collapse Commander
No need for placeholders with Collapse Commander

Leave a Reply

Your email address will not be published. Required fields are marked *