Mar 4, 2013

Using blogger tags to beautify template and creating plugins

Alright, long time without making a post huh.
On today's post i decided on making a simple tutorial on blogger, creating plugins by adding short tags and features to template

Blogger, add link to website

Blogger add link to website plugin Demo: just drop down to post end.
Uisng blogger tags we can get currect url easily.
Go to Blogger > Template > tick Expand widget template and search for:
<b:if cond='data:blog.pageType == &quot;static_page&quot;'><data:post.body/></b:if>
 Above it paste this code:
<span style='color:#666;font-size:11px;font-weight:bold'>Add this post to your website</span>
<textarea onclick='this.focus();' onfocus='' readonly='readonly' style='width:100%;outline:none;height:60px;padding-right:12px;color:#333'>
<data:post.title/> | <a expr:href='data:post.url'><data:post.title/></a>
 and you're done

Title tag seo

Using this method you can easily self specify the way the title tag can be shown in the page.
Again go to Blogger > Template > tick Expand widget template and search for:

At the top (most of cases) you will find this piece of code
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<title><data:blog.pageTitle/> - Web Developement blog, Tutorials on Php, Mysql, Jquery with examples</title>
<title><data:blog.pageName/> - <data:blog.title/></title>
What it does is, if homepage display some title, if post display post title and page title.
You can easuly costumize it on your own, ex showing only blog post without title (seo), ex:
    <b:if cond='data:blog.pageType == &quot;index&quot;'>
    <title><data:blog.pageName/> - <data:blog.title/></title>

Adsense tips

Meta keywords

They do not have any seo benefit anymore for most of search engines like google and bing.
The only purpose of using them is defining what type of ad category should be shown on the site, also for showing ads with high CPC(cost per click)
The best tool on finding this keywords is Google keyword tools.
After you got some nice keywords, all of them should not pass 200-500 chars then find the <head> part and below it type:
<meta content='keywords, here' name='keywords'/>

 Showing ads above post

Search for
the second result and above it add your adsense code.
First of all you shoul encode the adsence code the paste it above just like this:
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-ID&quot;;
/* post */
google_ad_slot = &quot;ID&quot;;
google_ad_width = 336;
google_ad_height = 280;
&lt;script type=&quot;text/javascript&quot;
src=&quot;;&gt; &lt;/script&gt;
Hope you like this simple tips i made, also ill create the socond part soon on using blogger template functions.

1 comment:

Follow by Email