How to post script/code on word press


Just use the sourcecode tag in the following way (don’t put the underscores in):

[__sourcecode lanaguage=”csharp”]
string s = “hello world”;
System.Console.WriteLine(s);
[__/sourcecode]

And it will display like this.


string s= "hello world";
System.Console.WriteLine(s);

The following languages are support.

  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml

 

Advertisements