Workaround to Override WordPress Shortcode and Display the [] Brackets Tags

WordPress has added a new function named shortcode with API that WordPress developers and programmers to write plugins that create macro codes for use in post content beginning from WordPress version 2.5. Essentially shortcode is an easy-to-use feature where bloggers just need to insert a bracket-delineated strings that can be magically expanded at runtime to reflect actual dynamic contents., without the need to deal with complex HTML and embed codes.

The problem is that to embed shortcode in WordPress posts or pages, authors have to enclose the shortcode in [ and ] brackets, with certain sting inside. What if you need to write and display the a true and genuine text, which is not shortcode, but have to enclose within brackets (”[" and "]“), and so coincidentally, the the whole text with brackets is one of the shortcodes created and declared in WordPress environment? For example, WordPress comes built-in with [gallery] shortcode, distracting users ability to type “gallery” word in brackets.

If the text in bracket that you type magically disappear and appear as some other content type (will likely to happen more as more plugins embrace shortcode), you can simply leave a space between one of the bracket and the affected text string in the bracket. But this workaround would make the text appears to be weird and not beautiful.

The more recommended way is to type the brackets using numeric character reference, aka ISO Latin-1 code. The “[" and "]” brackets do not have HTML entity, thus users will have to remember the numeric character reference for the brackets.

[ => [
] => ]

As shown in figure above, to type “[" and make sure that it's always appear as "[" without affecting by shortcode, type [ replacing the [. The same applied to ], which should be replaced with ].



One Response to “Workaround to Override WordPress Shortcode and Display the [] Brackets Tags”

  1. Workaround to Override WordPress Shortcode and Display the [] Brackets Tags (Excerpt) » My Digital Life
    April 17th, 2008 10:51
    1

    [...] reading Workaround to Override WordPress Shortcode and Display the [] Brackets Tags at Tip and [...]

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to Tip and Trick Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

Incoming Search Terms for the Article

wordpress gallery shortcode - wordpress shortcode - wordpress shortcodes - shortcode wordpress - gallery shortcode - wordpress youtube shortcode - wordpress override function - gallery shortcode wordpress - wordpress override gallery - wordpress - wordpress gallery short code - wordpress short code - wordpress shortcode not working - wordpress shortcode feed - wordpress override - wordpress shortcode excerpt - override wordpress function - shortcodes wordpress - wordpress 2.5 gallery shortcode - flickr shortcode - wordpress shortcode comments - wordpress brackets - wordpress override html - display wordpress media gallery - wordpress call shortcode from function - wordpress gallery shortcode not working - html entities wordpress shortcode - enable wordpress shortcode - gallery shortcode example - wordpress short code youtube - wordpress shortcodes not working - display brakets - youtube shortcode wordpress - wordpress override functions - gallery excerpt shortcode wordpress - override function wordpress - how to use wordpress shortcodes - wordpress gallery shortcode replace - wordpress override shortcode - wordpress override gallery shortcode - gallery shortcode not working - excerpt wordpress gallery shortcode appearing - genuine microsoft software - changing "gallery shortcode" wordpress - wordpress flickr shortcode - reduce spacing gallery shortcode wordpress - wordpress shortcodes comments - wordpress gallery shortcode example - fix gallery shortcode - embed Shortcode wordpress -