Showing posts with label Blog Tutorial. Show all posts
Showing posts with label Blog Tutorial. Show all posts

How to show blog author or writer info in every blogger post ?

The author or writer of any blog in blogger or wordpress is the main person who shares their great thought around the blogger world. So it is not a bad idea if you add a section about author or writer info in every blogger post . If you notice my blog, you noticed that little info is available in my every blog post like below picture



Now you may use this author or writer info in your every blogger post. See here how to do -

1. First login to Blogger and navigate to Design >>>>Edit HTML.

2. Download the full HTML as a backup in your computer for any unwanted accident.

3. Find out this ]]></b:skin> code

4.After finding this above code add the below code before ]]></b:skin>




5. After adding this above code again search this <data:post.body/>  code in your HTML Template

6. Now add the below code immediately after <data:post.body/>

 

7. Before copy the above code in your blogger template you may edit this above code like below

* Your Name = Provide the blog writer or author name

* Image Url = To show your blogger or author image provide the image url in src='Image Url'

* Add any link over here = link the blog author or writer with social site such as Facebook, Twitter

* Then write something about author or writer in "Write something about yourself here"

Now save the Template and enjoy.

How to add related posts widget with thumbnails in Blogger ?

Adding related posts widget with thumbnails in blogger help your website reader to see at a glance of your related post, without moving the existing blog post. You can easily add this related posts with thumbnails in your blogger.

Related posts widget with thumbnails in blogger

To add this related post with thumbnails follow this :

Step 1: First login to your blogger account and navigate to Design/Layout &amp;gt; Edit HTML and check the "Expand Widget Templates" checkbox.

Step 2: Now find </head>

Step 3: Replace </head> with the below code

<!--Related Posts with thumbnails Scripts and Styles Start-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style type="text/css">
#related-posts {
float:center;
text-transform:none;
height:100%;
min-height:100%;
padding-top:5px;
padding-left:5px;
}
#related-posts h2{
font-size: 1.6em;
font-weight: bold;
color: black;
font-family: Georgia, &#8220;Times New Roman&#8221;, Times, serif;
margin-bottom: 0.75em;
margin-top: 0em;
padding-top: 0em;
}
#related-posts a{
color:black;
}
#related-posts a:hover{
color:black;
}
#related-posts a:hover {
background-color:#d4eaf2;
}
</style>
<script src='http://blogergadgets.googlecode.com/files/relatedthumbs21.js' type='text/javascript'/>
</b:if>
<!--Related Posts with thumbnails Scripts and Styles End-->
</head>


Step 4: Now find the below code

<div class='post-footer-line post-footer-line-1'>
                           
                     OR

<p class='post-footer-line post-footer-line-1'>

Step 5: Put the given code below after the above one

<!-- Related Posts with Thumbnails Code by emdadblog Start-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != &quot;true&quot;'>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels_thumbs&amp;max-results=6&quot;' type='text/javascript'/></b:if></b:loop>
<script type='text/javascript'>
var currentposturl=&quot;<data:post.url/>&quot;;
var maxresults=5;
var relatedpoststitle="Related Posts";
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs();
</script>
</div><div style='clear:both'/>
</b:if>
<!-- Related Posts with Thumbnails Code End-->


Note
: You can adjust the maximum number of related posts being displayed by editing this line in the code :

var maxresultes=5;

Note : To edit the title of the widget you can change this line of code :

var relatedposttitle="Related Posts"

Step 6: Now save the template

How to show page number in blogger ?

You might have seen page navigation for almost all wordpress users, after waiting so long now blogger users also can have paging in blogger.

Follow this steps to implement page navigation in blogger/ show page number in blogger.

Step 1 : Go to Layout/Design > Page Element > add a gadget > HTML/Javascript and add the code below


After installing this gadget code proceed for label fix

Step 2 : Navigate to Layout/Design > Edit Html


Step 3 : Don't click the checkbox "Expand Widget Templates"

Step 4: Now find this ]]></b:skin> and replace this with below code

This is the CSS part which defines the look and feel of the page navigation. You can modify it .

Step 5 : Next is the javascript part. Find </body> and replace it with below code and modify according to your need




where you can modify ?

Var pageCount=5;


this code determines the number of post that would be displayed per page


var displayPageNum=5;


This code determines the number of additional page navigation numbers that will be displayed on the page


var upPageWord='Previous'

var downPageWord='Next'


this two lines determines the text that would be shown for the previous page and next page.





How to show blogger widget in scroll box

Has your recent post blogger widget grown so longer that your recent post blogger widget look like a Burj Khalifa? If yes then it is not good for your visitor.  Because it takes much time to scroll your recent post widget in blogger from beginning to end.Another matter is, it's makes your blog not to see good. So it will be a better idea if you put your blogger widget in scroll box.As a result no matter how much it long your blog remain good look to see. To put your blogger widget in scroll box follow below steps :

First choose your blogger widget which you want to put in scroll box.

Login to your Blogger account

Find the Widget ID. See How to find blogger widget ID and Section ID

Go back to Dashboard > Design > Edit Html
(Don't forget to take Backup before you make any change)

Now Check the "Expand Widget Templates" on top right of the HTML window

Find the below code in your template (To find the code you may use Ctrl+F) :

 ]]></b:skin>

Add the below code before ]]></b:skin> the line



Where to change :

YourWidgetId = put your own blogger widget id

Height: 200px = change height according to your wish

Save and enjoy

Blogger widget in scroll box mission accomplish

How to Display widget on specific pages/posts In Blogger

When you add a widget (or a gadget as Blogger would call it) to your blog, by default the widget would appear on all pages –homepage, index, archive, post and static pages. But what if you want a certain widget to appear only on a certain page or pages, can it be done? In other words can you select on which page or pages the widget appears?  The answer is yes you can -using  conditional tags.

You might notice my Live visitor widget only appears on Home page. That’s because I applied this very trick to it. Okay let’s proceed:

1. Find your widget ID

 To address a widget id in HTML or CSS, you need to know the widget's ID. Here is How to find Blogger Widget ID and Section ID

2. Locate the widget code in HTML
* Login to Blogger
* Go to Dashboard >Design>Edit HTML
 (Note : before you make any changes please make sure that you have Backup your HTML)
* Check the Expand Widget Templates, Check box on top right of the HTML Window.
* Find your widget id in the HTML using Ctrl+F and entering the widget ID in the search box.


Your widget code might look like this. It may be a little different, but it's okay.



3. Applying the conditional tags

Insert the opening tag <b:if cond='Condition'> immediately after <b:includable id='main'> and the closing tag </b:if> immediately before </b:includable> as shown below. The code checks whether the condition is true, and executes the content if it is.


To show a widget on index pages (i.e. homepage, archive and label pages), replace 'CONDITION' with 'data:blog.pageType == "index"'

So the proper code will look <b:if cond='data:blog.pageType == "index"'>

To show widget only on post pages
replace 'CONDITION' with <b:if cond='data:blog.pageType == "item"'> the attribute refers to post pages.

To show widget only on Static pages replace 'CONDITION' with <b:if cond='data:blog.pageType == "static_page"'>


To show widget only on archive pages replace 'CONDITION' with <b:if cond='data:blog.pageType == "archive"'>

To show widget only on homepage replace 'CONDITION' with <b:if cond='data:blog.url == data:blog.homepageUrl'>

To show widget on a specific page/url replace 'CONDITION' with  <b:if cond='data:blog.url == "http://emdadblog.blogspot.com"'> Provide your own url in "http://emdadblog.blogspot.com"

To show widget on pages other then the specified page replace == with != for example to show widget on pages other then hompage,following code should like this <b:if cond='data:blog.url != data:blog.homepageUrl'>
4. Save and enjoy.

How to find Blogger Widget ID and Section ID


Suppose you want to change the text color in one of your widgets, in the sidebar. You know this is done in the stylesheet and you can even find the code for the sidebar. But changing the code for the sidebar will affect the whole sidebar. Then how do you address only that particular widget?
You need something unique -an Id, a widget Id that is. With a widget Id, you can:

Use it as a selector in stylesheet when styling the widget. ( To use an Id as a selector, you need to add the pound sign “#” as a prefix, as in #YourWidgetId {} ).Use it with Javascript getElementById method to access the widget content.

If you add a widget via Add A Gadget link in Page Elements, Blogger will automatically generate an Id for the widget, without telling you what the Id is. To find the Id, you’d normally have to search inside the template HTML code.
Well I have searched a simpler and more straightforward way, without the need to go into your template HTML.
As an example I’m going to check my Recent Posts widget Id and the corresponding section Id. Follow me through the steps:
  • Login to  Blogger
  • Go to Design > Page Elements and locate the widget. 
  • Click the Edit link and widget configuration window will pop up.
  • Notice there is an url of the widget on top of the window. What we are looking for is somewhere within that url.
  • Click maximize (the square icon) on top right corner of the window to view the window in full screen.


This is the url: 


http://www.blogger.com/rearrange?blogID=XXXXXXXXXXX&action=editWidget&sectionId=sidebar4&widgetType=null&widgetId=HTML4


There they are, sectionId=sidebar4  and widgetId=HTML4. So  the section Id is sidebar4 and my Recent Posts widget Id is HTML4.

Notice you can also find your blog Id (blogID) in the url.Mission accomplished! Enjoy!