How to display WordPress shortcodes as a text?

Last day working on documentation of the BWL Advanced FAQ Manager Plugin, and I need to display FAQ shortcodes as text inside the documentation. I pasted the shortcode inside the documentation page, and when it was displayed on the front end, the shortcode executed and displayed its contents. That causes a lot of issues. However, I found a small trick to display the shortcode as text. Just add another starting and ending bracket before and after the shortcode syntax. Here goes an example-

Original Shortcode:

[bwla_faq meta_key = ‘votes_count’ orderby = ‘meta_value_num’ order = ‘DESC’ /]

Text Version of Shortcode:

[[bwla_faq meta_key = ‘votes_count’ orderby = ‘meta_value_num’ order = ‘DESC’ /]]

Note: You need to add these reference codes only in the text editor of WordPress, not in the visual editor. Adding in a visual editor will consider it was alphabets and special characters.

That’s it. I hope that tips will help you to display shortcodes as text on your site. Happy coding!

Total 0 Votes
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Comment

Back To Top
Cool Ajax - Web Development Tutorial Blog
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.