Case Study : Using SyntaxHighlighter plugin to write source code in the WordPress post.

Requirements : WordPress bundle, download here. and SyntaxHighlighter, download here.

Sometimes, we will need to write a sourcecode in our WordPress. This is if we write some tutorial about some programming language. WordPress it self actually already provide some facilities to write a sourcecode, for example :

<code> your code here </code>

Actuallt, this facilities run well in showing your code, but maybe you wont like it because it isn’t quite good-looking. Too small, and have a same colour for every code. Just like this,

If you really isn’t like with this, may you can use this plugin. Syntax Highlighter. Write a source code with this plugin will give some advantages,

  1. There are numbering in front of every line of code –> This will help you if you want to give an explanation in every code.
  2. Colorfull code
  3. Standard font size
  4. Customizable (self-settingi). For example, you can give a highlight in the code.

Step 1 : Syntax Highlighter Installation

  1. Download syntaxhighlighter plugin from here
  2. Start the installation. Login to your WordPress, you will be redirected in to dashboard page
  3. Choose Plugins menu in the left side WordPress page.
  4. Choose Add New tab
  5. In the Install Plugin menu, choose Upload tab.
  6. Browse file zip syntaxhighlighter plugin from download, then click Install Now
  7. So it will show install conformation success like the image below.
  8. Click Activate Plugin to activated the plugin .

Step 2 : Using the Plugin

  1. Create a new post with click menu Posts – Add New
  2. Type this sample in the HTML editor page (NOT the Visual Editor page). See the red circle in the picture,

  3. Just like that. Choose publish and you will see the picture below,

This plugin support for actionscript3, bash, coldfusion, cpp, csharp, php, css, xml, javascript, java, perl, sql.. till phyton :D For the full language which supported by this plugin, go here.

Step 3 : Plugin Customization

With this plugin, you can customize the appearance of sourcecode with several optional option. One option is that you can optionally give highlights on certain lines of code. For example,

Code –>


And there are many optional choices that you can try it yourself. You can find a wide selection of optional here.
Happy trying :D happy WordPress-ing :D
Hal yang juga menarik:

Hak Cipta

Semua skrip dan teknik dalam artikel di boleh digunakan sebagaimana kehendakmu tanpa perlu mencantumkan sumber. Kamu tidak boleh mengkopi seluruh artikel, dalam Bahasa Indonesia ataupun diterjemahkan ke dalam bahasa lain.

Related Articles:

Artikel terkait:

About the author

obviously, a girl. with sweet smile, off course. turning her 21 years trapped on Informatics departement and just started to having some crush with it lately. she uses wordpress. she loves php. she lo


  • woodhzxx mengatakan:

    NIKE SHOX shoes, Nike shoes, a special mode. Cheap sports shoes 123 456 789 123 456 789 to find an affordable company, we all know, not just for his good shoes SHOX model.

    123 456 789 [url=]nike shox r4[/url] nike shox r4 a customers I have a great work of the SHOX [url=]discount shox[/url] discount shox z athletic [url=]nike shox nz[/url] nike shox nz m shoe industry, focused on the fan, the only neighborhood committee, in fact, immense popularity and international famous brands, foot, and their shoes, just not suitable for work so I do not play basketball, but mostly came this key line of clothing, I think the model of basketball, football players. In fact, the country’s sport is basketball, the players need to exercise, and can not [url=]nike shox[/url] nike shox y meet their [b]nike shox[/b] y needs through their [b]nike shox r4[/b] u own mental acrobatics. If a professional gambler, he sailed with his feet, they freely through a simple, lightweight buffer called for under 123 456 789 – pronation can be used for the neutral buffer lighter weight, you want a very unique very simple to develop. For a given level, effectively 123 456 789 socket, we want to know that these shoes can be said to be a shoes.If basketball, we should understand what kind of basketball shoes. From the light the only thing, but also on a single oxygen in the rear sole air-cushioned shoes can also import the weight. Is a great [b]discount shox[/b] z choice, at least in the Speed ??ster, it is not no limit to the ankle. A variety of the easiest, most comfortable and convenient, and [b]nike shox nz[/b] s their co-movement of the ankle, just because the speed is usually the key intermediate for all older people to play basketball. However, these three games 123 456 789 Wholesale export will include all the parts. We all know its name, it is indeed the direction of the layout of a basketball player.

Tinggalkan Balasan

Alamat surel Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

x( X-( B-) ;-) :wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :D :?: :-| :-x :-o :-P :-D :-? :-)) :-) :-( :-& :) :( :!: 8-O 8-) 8) (Русский) (yahoo) (worship) (woot) (wave) (unsure) (tongue) (thinking) (tears) (taser) (smileydance) (sleeping) (sick) (scenic) (rofl) (rock) (party) (panic) (okok) (nottalking) (ninja) (music) (muscle) (muhaha) (money) (mmm) (lonely) (lol) (lmao) (idiot) (hungry) (highfive) (heart_beat) (heart) (headspin) (hassle) (haha) (gym) (griltongue) (goodluck) (girlkiss) (funkydance) (fish_hit) (eyeroll) (evilsmirk) (evil_grin) (drinking) (doh) (devil) (dance) (cry) (cozy) (coffee) (brokenheart) (bringit) (blush) (bigeyes) (beer) (banana_rock) (banana_ninja) (banana_cool) (applause) (annoyed) (angry) (K) (: