Archive for the ‘Wordpress’ Category

Sometimes you want to put code in your wordpress blog. The beste way to write code is switch to switch to HTML and put the <code> and </code> tags to your post.

Example with <code>:


mailq | tail -n +2 | grep -v '^ *(' | awk  'BEGIN { RS = "" } { if ($7 == "user@example.com") print $1 } ' | tr -d '*!' | postsuper -d -

Example withoute <code>:

mailq | tail -n +2 | grep -v ‘^ *(‘ | awk  ‘BEGIN { RS = “” } { if ($7 == “user@example.com”) print $1 } ‘ | tr -d ‘*!’ | postsuper -d -

You will see that some characters won’t display correctly if you don’t use the code tag.

Another/better way to publish code is using the “SyntaxHighlighter Evolved” plugin.

Example:

mailq | tail -n +2 | grep -v '^ *(' | awk  'BEGIN { RS = "" } { if ($7 == "user@example.com") print $1 } ' | tr -d '*!' | postsuper -d -

And if you need special characters in your post try these:

< = &lt;
> = &gt;
/ = &#47;  	
] = &#93;
[ = &#91;
" = &#34;
' = &#39;

And if you want to use a code language try these

[code language="sql"]
your code here
[/code]

The following languages are supported:

actionscript3
bash
clojure
coldfusion
cpp
csharp
css
delphi
erlang
fsharp
diff
groovy
html
javascript
java
javafx
matlab (keywords only)
objc
perl
php
text
powershell
python
r
ruby
scala
sql
vb
xml

SQL script Example:

USE database;
SELECT * FROM Persons
WHERE City='Sandnes'

Last but not least. DO NOT USE THE VISUAL VIEW :) Visual will scramble your code.

Today is was time for a new WordPress skin/theme. I search the default wordpress themes but without success. Then I tried Artisteer. I used it for a Joomla theme once and it is very easy to create nice looking theme for WordPress, Joomla and Drupal.

If you can work with Office 2007 and above you can create themes :)

Check screen:

Switch to our mobile site