Plugin Directory

Code Snippet

Code Snippet is WordPress plugin for displaying code with highlighting in blog posts using the GeSHi engine.

Download Version 2.1.5

Do I need to wrap this my code in <code> block?

No. Instead, wrap your code in a <pre> block and then use [code lang="lang"][/code] to wrap your code.

How can I customize the code block layout?

In the WordPress Admin interface, under Options -> Code Highlighting, you can specify a custom CSS stlye to wrap your code blocks in. While the preview button is nice, Firebug would be the tool I would recommend.

Can I use this with custom wordpress themes?

Yes; however, you might need to do a little bit of tweaking. JR found that CodeSnippet automatically adds a link if you're theme is using wp_head; however, if it isn't, you'll need to add the link to the codesnippet/codesnippet.css stlye sheet to your header and you'll also have to define the 'codesnip-container' element. The default value is: border:1px solid #ccc; background:#eee; padding: 5px;margin:10px;

Requires: 2.0 or higher
Compatible up to: 2.8.1
Last Updated: 2009-8-3 Downloads: 19,133

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(12 ratings)

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

Log in to vote.

0,1,0
100,2,2
25,4,1
0,1,0
80,5,4
100,1,1
0,1,0