Write code inside your wordpress post easily.

If you are a developer and writing technical blog post you frequently need to write the code inside your blog post to demonstrate your explanation. WordPress provides this feature. To write code inside your wordpress post without any plugin open text view of your post write code between

For example

and you can see result of above code as mentioned below.

class Employee{

private $email;

private $firstName;


public function getEmail(){

return $this->email;



As shown in above code that syntax is in php language so we have added lang=”php” attribute. In this you way you can add attribute based on code language. Other options for lang attribute value are mentioned below.

  • 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

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s