AimeeTheGreat
Member
Posted 4 months ago #
Using the latest version of WordPress. One of my plugins used a shortcode within square brackets. Unfortunately it used a common word and it activated in one of my pages in the middle of a paragraph with hilarious effects. Anyways, I use the shortcode elsewhere so I don't want to disable it entirely. How do I disable it for a specific page?
I temporarily changed the square-brackets to regular brackets but that's not really the best solution.
Thanks.
One way around this issue would be to use the html character entities for the square brackets
[ = & #91;
] = & #93;
(without the space after the ampersand)
Unfortunately going into the visual editor will convert the character entities into [ ] again
Another way would be to create a shortcode to enclose the content in square brackets and make that into a plugin - or put it into functions.php, so typing [square]text[/square] will come out as [text]
roidayan
Member
Posted 3 months ago #
I myself only use plugins that use the shortcode api and not doing regexp on the post content.
Then if in the post you use double brackets like shortcode it wont activate the shortcode callback and will show as [shortcode].