Displaying code in wordpress

There are a few ways to show your readers actual html code, php code or any other code without getting it converted by the browser into whatever the code is supposed to do.

1. The simplest approach is to replace the left < and right > brackets encompassing the code with the corresponding HTML characters for the brackets although this might get tedious if you have a lot of code to show.

2. If you are running wordpress you can simply install a plugin for this instead. This will give you more flexibility. I recommend the “Qoate Simple Code Snippets” plugin. Simply search for it through your wordpress plugin interface.

Comments are closed.