Display a Shortcode without execute

Advertisement

Problem Problem

Most of the times we need to display the actual shortcode into the documentation, blog post or somewhere else by without executing it.

But, If that plugin is installed on our website where we use that shortcode into our documentation then that shortcode executing their markup.

For example, I have created a plugin Easy Social Shares and created a blog post which demonstrates how to use that shortcode in post Easy Social Share Buttons for WordPress.

Top ↑

Solution Solution

To avoid the shrotcode execution we need to use double square brackets [[]] instead of single one.

For example my shortcode is:

[easy_social_shares]

But, In the article I have used:

[[easy_social_shares]]

Below is the screenshot of the content in which you can see how it is used.

Display a shortcode without executing
Display a shortcode without executing

Leave a Reply