Template Tweaking to Add the Short URLs
- Login to your Blogger Dashboard and navigate to Design > Edit HTML
- Click on the Check Box which says “Expand Widget Templates.
- Locate
and add the following JavaScript Snippet just above that
Optional Tweaks
1.Styling the Share LinkLocate the following line in your template
]]>and just above that line add
#bp_shorturl {and save.
color:#666;
font-size:11px
}
#bp_shorturl input {
color:#999;
border:inset 1px #CDCDCD;
padding:1px 5px;
}
2. Display the Short Link on Post Pages Only
If you want to restrict the Short URLs to your post pages, then wrap the codes mentioned in Steps 1 and 4 within Conditional tags like :
3. If you have your own Bit.Ly Login and API key, then you can replace them in the code of Step 1(tweettrackjs and R_7e9987b2fd13d7e4e881f9cbb168f523). Its free to signup and it is advised to use your own login and API because too many API calls on the same login can create an undefined error
Demo: (wont appear if you are reading this in a a feed reader or else where)
0 commentaires:
Enregistrer un commentaire