Crayon Themes for lang:sh

Code snippets

Adding code snippets to WordPress

  • Search plugins for syntax.
  • Install Crayon.
  • Read documentation.
  • Use <pre> tags in “Text” mode as shown below.


<pre class="lang:swift" title="A snippet of code">
import UIKit
class SampleClass: NSObject {
var variable:Double
}
</pre>

  • End up with something like this:

It’s that easy!