Shortcode example: [mytab] my content [/mytab]
.
But when the plugin is active, it shows the content of shortcode, not show the shortcode as text. I do not want to show the content, I want to show only the shortcode like this. [mytab] my content [/mytab]
Using the answer from Wordpress Stackexchange:
3 solutions to show your shortcode as text ( not execute it ):
Use second []
for your shortcodes. Such as:
[[my-shortcode]]
For your case this solution will work so:
[[mytab] my content [/mytab]]
Break the shortcode with some HTML tag, like <span>
, <p>
, <code>
, <div>
and etc. Such as:
[<code>my-shortcode</code>]
Your case:
[<code>mytab</code>] my content [<code>/mytab</code>]
Escape [
with [
and ]
with ]
:
[my-shortcode]
Your code:
[mytab] my content [/mytab]
NOTE: if you'll add the 3-rd solution into Text Editor of WordPress and after will switch to Visual editor, then your escapes will converted to []