Prettify Code Syntax Wordpress Plugin is used by 27 websites. Among 27, 0 site is within top 10,000 and 0 site is within top 100,000 websites.

Wordpress Plugin Information of

Plugin Meta Name Plugin Meta Information
Plugin Name
Plugin Description Code syntax highlighter using Google Prettify, supporting the HTML5 recommendation, and caching plugins.
Detail Plugin Description

The main reason for the development of this plugin was the lack of options supporting the HTML5 recommendation, where the code snippets should be tagged with pre followed by code, and optionally a class starting with language- and then our language.

You can use the plugin like this:

<pre class="prettyprint"><code class="language-php">
// my code
</code></pre>

Also very important is that although this plugin loads different files depending on your configuration, it fully supports caching scripts (W3 Total Cache) to concatenate and compress all the css and js, so the impact in performance will be minimum.

Languages

This syntax highlighter is based on Google Code Prettify and should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, Javascript, Makefiles, and Rust. It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl and Ruby, but, because of commenting conventions, doesn't work on Smalltalk.

Other languages are supported via an extension (plugin options): CSS, SQL, YAML, Visual Basic, Clojure, Scala, Latek (TeX, LaTeX), WikiText, Erlang, Go, Haskell, Lua, OCAML, SML, F#, Nemerle, Protocol Buffers, CHDL (VHDL), XQ (XQuery), Lisp, Scheme, Dart, Llvm, Mumps, Pascal, R, S, RD, TCL

Styles

Four different styles are provided, and they can be previewed in the plugin options. They are modified to make sure they don't clash with any other styles in your theme.

You have also the option to include your custom style.

If you have a style that would like to see included in the option list, just contact me, or fork me.

Notes

  • Plugin options are at Settings > Prettify Code Syntax. Have a look at the Screenshots tab to see how it looks like.

  • If you don't care too much about the HTML5 recommendation, you can skip the language- class. The code always gets detected automatically.

  • It will also work if you only use a pre tag without the code tag (but long lines will be wrapped instead of get horizontal scroll), or if you only use a code tag with the prettyprint class (but if you don't use pre your spaces/returns won't be maintained.)

  • Be careful using the Visual Editor tab when inserting code, as some HTML tags will be modified or removed.

  • Using a chaching plugin like W3 Total Cache is highly recommended.

Demo

You can find a front end demo here a the bottom.

More Information Wordpress Official Plugin Repository
Google

Top 27 Websites built with Wordpress plugin

MyMail Newsletter Plugin | a plugin for WordPress
Mind the Product - Product Management blog and events
Charity & Biscuits | Charity Web Designers
211,183 favicon of READWRITE.JP READWRITE.JP
ReadWrite Japan | ReadWrite日本版:最先端のWEBトレンドを独自の視点で分析し論説するIT業界注目の新鋭ブログメディア
223,594 favicon of KWSKI.NET KWSKI.NET
Think deeply, Do less, More effective
Creative Punch - Tutorials and resources for PHP, HTML5, CSS, and much more!
動画マーケティングの最新情報|movieTIMES ムービータイムス
299,389 favicon of TEAMCHAT.COM TEAMCHAT.COM
Teamchat l Enterprise Messaging & Business Chat App
A Healthy Life For Me - Cooking, Gardening and Living a Healthy Life
Fuse Powered | We help mobile game and app publishers make more money every day
WordPress Advice - DIYWebmastery - Helping You Win With WordPress
Design Interativo - Design, Webdesign, UX e Arquitetura de Informação
Desarrollo Web - Luis Fernando Cázares Bulbarela
HTML5 Hacks
生信菜鸟团 | 欢迎加群201161227,线下交流-深圳大学城
30,000,000 favicon of FRITTT.COM FRITTT.COM
Frittt | Download Free Templates and Themes
30,000,000 favicon of BEWEBMASTER.RU BEWEBMASTER.RU
Секреты вебмастера
30,000,000 favicon of CLAUDEBUENO.COM CLAUDEBUENO.COM
Claude Bueno - Consultant Web
30,000,000 favicon of LESSONS4YOU.INFO LESSONS4YOU.INFO
Lessons4you.info - Tutorials & Resuorces
30,000,000 favicon of THYNGSTER.COM THYNGSTER.COM
David Vallejo – Consultor Google Analytics | Web Analytics :: Developing :: Optimization :: Conversion
30,000,000 favicon of EGGDROP.ES EGGDROP.ES
Eggdrop España - Bot Script IRC y programación en eggdrop.es
30,000,000 favicon of IIPC.ORG IIPC.ORG
IIPC | Instituto Internacional de Projeciologia e Conscienciologia
30,000,000 favicon of KNOLPAD.COM KNOLPAD.COM
Knolpad | We Try Products, So You Don't Have To
30,000,000 favicon of MILAWEB.COM MILAWEB.COM
Milaweb
30,000,000 favicon of GAITERJONES.COM GAITERJONES.COM
g a i t e r j o n e s | (c) 1970
30,000,000 favicon of WUTTHIPHAN.COM WUTTHIPHAN.COM
ถนนเส้นนี้ กลับบ้าน | - ย้อนรอยความฝัน กับคืนวันที่ผ่านไป -
30,000,000 favicon of SARAHJUSTINE.COM SARAHJUSTINE.COM
sarahjustine.com | Half design geek, half tech junkie, half wannabe photographer, half travel enthusiast, one-quarter bad at math.