Skip to main content

How To Add Code Snippet To Blogger


Blogger is a beautiful place to blog in, not withstanding all the discouragements you may get from some bloggers who do not fancy blogger. 
have you been looking for a way to add code snippet to blogger and you do not want to use the blockquote system? 
Well worry no more because the best option is here for you... 

How to Enable Adding Code snippet in Blogger

1. Back up your template. 
2. Go to html in your template section 
3. Search for </head>, copy the code below and paste into your Blogger's template file, right above </head> tag.

<link href='http://alexgorbatchev.com/pub/sh/2.1.382/styles/shCore.css' rel='stylesheet' type='text/css'/> 
<link href='http://alexgorbatchev.com/pub/sh/2.1.382/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shCore.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushCpp.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushCSharp.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushCss.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushJScript.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushPhp.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushPython.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushRuby.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushSql.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushVb.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushXml.js' type='text/javascript'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.382/scripts/shBrushPerl.js' type='text/javascript'/> 
<script language='javascript'> 
SyntaxHighlighter.config.bloggerMode = true; 
SyntaxHighlighter.config.clipboardSwf = &#39;http://alexgorbatchev.com/pub/sh/2.1.382/scripts/clipboard.swf&#39;; 
SyntaxHighlighter.all(); 
</script>

now save your template... 

when ever you want to add a code to your blog post, parse the code here or learn how to add code parser to your blog. After parsing, wrap the parsed code snippets inside the tags: <pre class="brush: language-name"> </pre>


Note replace Language-name with your preferred brush name. Brush name looks like this shBrushPerl, you are to pick perl if that's the brush name you prefer. 

and that's it... 

Comments

Popular posts from this blog

Earn While you Save With Alat.ng

If you've always wanted to save up for the future, but didn't take actions for reasons best known to you, now is the time to reconsider your thoughts and take actions, because there is a digital bank known as ALAT waiting to be utilized. What Is A Digital Bank? According to Avoka.com; "Digital banking is the digitization (or moving online) of all the traditional banking activities and programs that historically were only available to customers when physically inside of a bank branch." What is ALAT? ALAT is a digital bank, the first if its kind in Nigeria! It is an innovation of Wema Bank Nigeria, developed to give you easy access to saving your funds and doing other bank transactions without being physically present at the bank.  With Alat digital bank, you can open a savings account using your phone number and Bank Verification Number (BVN) as well as other documents that you will be prompted to upload during the registration process. It’s simple, convenient, reliabl...

How To Add Instagram Feed To Your Blog

You probably have an Instagram account and would want to showcase your pictures in your blog. Adding an Instagram widget to your blog goes beyond just showcasing your account to gaining followers, who wouldn't want more followers? This post will be your guide in embedding an Instagram feed into your blog. For people do not use or have an idea of Instagram, to let you know about the beautiful platform, I will run through it briefly.  Instagram is an online photo and video sharing network which let you share photos and videos straight from your mobile device to your account for your followers viewing pleasure. With Instagram, you can automatically share your photos and videos on social media networks such as Facebook, Twitter, Tumblr, and Flickr. I will be sharing a couple of tutorials with you today that not require a plugin, and can be used on either WordPress or Blogger platform, although I will center more on blogger users. There are many websites that could work ...

How to get a Payoneer Account For Receiving and Making Payments Online (Best Paypal Alternative)

Paypal is the most popular online payment processor and about 98% of websites make use of it to pay workers and publishers. Paypal is the best when it comes to receiving money and making payment but this flexibility have not been made accessible to some countries. While some don't have access to Paypal at all, others only have access to it as a means of making payments and not receiving payments. Now this is very sickening because such restriction impedes the chance of making money online. How are you going to get paid after all your struggles? As a Blogger and Affiliate Marketer or someone that works online, you will definitely need to get paid for the services you've rendered with or without a PayPal account! You've probably always paid someone to receive your cash which in the long run reduces your money. But not to worry, there's always a way out. There are tons of paypal alternatives , and they've been discussed previously, but here, we will ...