Tuesday , 21 May 2019

Best WordPress Plugin to Post Code Snippets

Post Code Snippets in WordPress

Here I am to talk about my most favorite WordPress plugin which is not actually developed by me it is my favorite plugin developed by Steven A. Zahm. I am talking about a plugin which may be useful, very useful for those bloggers who actually write about programming because it can highlight code for you in a very decent style, if you are confused that what I am talking about then just have a look the screen shot above.

How to Post Code Snippets in WordPress

Sometimes we want to show code to our blog readers or users who wants to learn something related to coding e.g PHP, HTML or JavaScript etc then we have to show the code within our posts, well it’s not much a difficult task to do we just need to add code within <code></code> tags this is default option provided by WordPress itself but I am talking about a plugin with name WP-Syntax which can help us to accomplish our goal in a very easy way we just need to install this plugin to our WordPress blog then we have to follow one more step to show programming language within posts in a WordPress blog. So just go to the URL given below for installation instructions.


How to Use WP-Syntax Plugin

After installation simply again go the URL to learn how to use this plugin I think I should show you how to show code okay then just follow the steps. It is very simple just wrap the code between <pre lang=”language” line=”1“> and </pre> replace language with any e.g PHP, HTML, JAVA, JavaScript etc and with the line attribute, if you want to show line numbers with code then just leave it as it otherwise just remove the line attribute and use only lang attribute.


Got Any Problem?

if you have any problem about showing code snippets to your posts then contact me through my blog comment system I always reply to my good blog fans. If you want video tutorial then I can make it but I don’t think there is need of it.

Leave a Reply