php - Wordpress- do not execute shortcodes inside code tags -


I have seen that when I was trying to print on the page to execute a certain shortcode, also That's the short code & lt; Code & gt; Tag

I am trying to get it where I can display everything inside the code tag and that wordpress can not do anything, i.e.:

  & Lt; Code & gt; [Shortcode] & lt; / Code & gt;   

Perfect as you see the above row on StackViewflow, I want to display it on my WordPress blog, even if [shortcode] is a short code

I tried to use the strip_shortcodes ()

, however, it actually takes the entire text out of the material, not only It prevents it from being executed.

Any ideas how to do that?

I just got the answer and I thought instead of removing my question, I would answer myself. I have been working for years together and I have never heard of this issue.

In order to display the shortcuts to WordPress and not execute them, you must use double brackets, that is:

  [[shortcode]]  < / Pre> 

WordPress will display it in a single bracket, which is unpredictable.

Comments