Shortcodes and source code
-
I want to blog about programming, with source code examples. I’ve tried <pre> (“preserve code formatting”) and it works but it’s not pretty. Then I saw this: https://en.support.wordpress.com/code/posting-source-code/ , where it implies that WordPress already has available shortcodes for displaying source code.
But when I tried using some of the suggested shortcodes, e.g.,
[sourcecode language="xml"]
or[sourcecode language="xml"]
they didn’t seem to do anything at all and the[sourcecode language="xml"]
appears literally in the post. Is there something I have to do to enable the sourcecode shortcode?Thanks in advance.
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘Shortcodes and source code’ is closed to new replies.