Site icon Dhanendran's Blog

Source code or syntax highlighting in WordPress.com

We have some limitations when we are hosting our blogs in WordPress.com with free plan.We can’t install many plugins to our blog, we can able to install only the limited plugins which is provided by the WordPress.com.

As tech guy, who write some awesome blogs about some technologies and want to highlight some source code on the blog they can’t simply add any plugin to the site :(.

But don’t worry, WordPress won’t let you down on this. Yes, WordPress.com will support some special shortcode which will help you in highlighting your source code.

code – is the shortcode which is supported by the WordPress.com.

#button {
    font-weight: bold;
    border: 2px solid #fff;
}

Code shortcode will support many languages for highlighting.

Those are;

There are more configuration options available.

Example:

 #button { font-weight: bold; border: 2px solid #fff; } 
#button { 
    font-weight: bold;
    border: 2px solid #fff;
}

More info @ WordPress.com

Exit mobile version