4

I am about to write some posts which has some Java code, and I would like to format it properly by coloring the Java keywords. Like in Eclipse.

I am looking for some recommendation for a theme / plugin to use.

0

2 Answers 2

7

It looks like it's rather standard nowadays:

[code language="css"]
   Your code here
[/code]

As described here by WordPress itself.

Sign up to request clarification or add additional context in comments.

3 Comments

Is this also avaible in community edition? I could not find the plugin itself nor does this work for me?
Yes, I was able to make it work on my community edition Wordpress account. Also, its not a plug-in. As the answer mentions, its built-in into Wordpress by default.
Yes, but for a self-hosted WordPress blog, you have to install and activate the plugin "SyntaxHighlighter Evolved" (by Alex Mills - 46 search hits if left out) before it works.
4

The Chili code formatter is a good WordPress plugin to do that.

Alternative link: WP Chili

You could have some other plugins with this page or this other one.

However, it has not been updated for since 2010. Maybe you should use much recent one like the WP Code plugin.

It seems new versions of WordPress have already included the support of code posting. It is very interesting for me too, LOL.

2 Comments

Re "new versions of WordPress have already included the support of code posting": Yes, but for a self-hosted WordPress blog, you have to install and activate the plugin "SyntaxHighlighter Evolved" (by Alex Mills - 46 search hits if left out) before it works.
I really coud not tell that when I have posted these answer, in 2012, because I have never used Wordpress. I am coding from php frameworks, especially zf1=>zf3, code igniter, modx, laravel, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.