When we start our blog and post 2-3 posts and when we see our blog in home page then by default blogger shows the full posts in the home page by we all want to know show that blogger should show half content in the home page and rest is show in the whole post. So, it’s better to give a summary of your posts on your blog’s homepage and then add a ‘read more’ link below that post summary. In this Blogger Tutorial i have a script that automatically converts your posts into read more summary in your blog homepage.
Demo of Read More hack
Installation of Read More Hack
- Login to Blogger > Dashborad
- Click on Drop Down Menu and select Template
- Backup your Template before making any changes to your blog
- Now Click on Edit HTML
- Press Ctrl + F and search the code shown below.
</head>
- Paste below code before </head>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(a,b){if(a.indexOf("<")!=-1){var s=a.split("<");for(var i=0;i<s.length;i++){if(s[i].indexOf(">")!=-1){s[i]=s[i].substring(s[i].indexOf(">")+1,s[i].length)}}a=s.join("")}b=(b<a.length-1)?b:a.length-2;while(a.charAt(b-1)!=' '&&a.indexOf(' ',b)!=-1)b++;a=a.substring(0,b-1);return a+'...'}function createSummaryAndThumb(a){var b=document.getElementById(a);var c="";var d=b.getElementsByTagName("img");var e=summary_noimg;if(d.length>=1){c='<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+d[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';e=summary_img}var f=c+'<div>'+removeHtmlTag(b.innerHTML,e)+'</div>';b.innerHTML=f}
//]]>
</script>
<script type='text/javascript'>
summary_noimg = 550;
summary_img = 450;
img_thumb_height = 150;
img_thumb_width = 200;
</script>
- Now find below code
<data:post.body/>
- Replace it with below code
<b:if cond='data:blog.pageType == "item"'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == "static_page"'>
<data:post.body/>
<b:else/>
<div expr:id='"summary" + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
<div style='clear: both;'/>
<span class='rmlink' style='font-weight:bold;padding:6px;float:right;text-align:right;'><a expr:href='data:post.url' >Read more</a></span>
</b:if>
</b:if>
- Now Save your template.
Make Changes....! (Optional)
summary_ noimg= 550; >> Length of the summary if the post does not have a thumbnail.
summary_img = 450; >> Length of the summery if the post have a thumbnail
null_thumb_height = 150; >> Height in pixels of the thumbnail.
null_thumb_width = 200; >> Width in pixels of the thumbnail.
Nice post keep it Up
ReplyDeleteI WILL ANSWER
Hi...bro
ReplyDeleteThank you,
I applied this to my blog and it is working fine. but i just want only image to be appear in the center, no words.
Can you give me the code please..
Thank you in advance..
@shree aixI will try to fulfill your request.
ReplyDeleteThanks for applying this.
Thank you very much for this tutorial. I have applied it on my blog http://apk3.blogspot.com/.It works like a charm. I need one more thing & it could make it even better. Text are not showing in a justifying manner before read more button. If you look after this issue & give me that update I will be even more grateful to you. Thank u once again.....
ReplyDeletethis code is present three time in blog.i have try in all one by one but not working.
this code is present three time in blog.i have try in all one by one but not working.
data : post . body
ReplyDelete@Malik Numansend me your template
ReplyDeletevhemant03@gmail.com here
Mr. Hemant Verma, Texts are not showing in a justifying manner before read more button. I am waiting for your response...
ReplyDelete@Rasel Ahmedplz mention your blog url.
ReplyDelete@Malik NumanIt's working on template also.
ReplyDelete| Demo |
Check Your Inbox template send you.
This is my blog URL: http://www.apk3.blogspot.com/
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletethank youz111111
ReplyDeleteHow do you make the thumbnail image larger? Also is there a way to let it show more of the summary rather then just a line?
ReplyDelete@**Randi**i didn't understnd u
ReplyDeletethanks, i appreciate that !... Nice n simple
ReplyDelete@Muhammad Rafik BakhtshirenYour most welcome. Keep Stay with us
ReplyDeleteThank You Very Much Bro! I Used Your Technique And Its Working!!
ReplyDeleteThis Is My Link..Http://Infoaday.Blogspot.Com/
The Ctrl+F That You Suggest Was Most Helpful..
I Just Having Difficulties With
"Replace it with below code."
It Should Be:
"Replace ALL OF IT IN THE TEMPLATE with below code."
By The Way, Thanks Again!
@Syaiful IzwanFollow the below steps...
ReplyDelete1. This is very simple you have to find this code <data:post.body/>
2. Delete this code <data:post.body/>
3. and finally Paste below code where you delete <data:post.body/> this code.
<b:if cond='data:blog.pageType == "item"'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == "static_page"'>
<data:post.body/>
<b:else/>
<div expr:id='"summary" + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
<div style='clear: both;'/>
<span class='rmlink' style='font-weight:bold;padding:6px;float:right;text-align:right;'><a expr:href='data:post.url' >Read more</a></span>
</b:if>
</b:if>
it's not working for me
ReplyDeletehey folk
ReplyDeleteread more text is not coming in my blog please look once
http://employmentsportal.blogspot.com
This code couldn't work in my site..,
ReplyDeletewhat should i do..?
my blogger site: http://allexamsinfo.blogspot.com/
I am trying to do this with my blog, but for some reason I can't find this code when I do ctrl F:
ReplyDeleteAm I doing something wrong??
@Sloppy Copy Mommy
ReplyDeleteMy comment isn't showing the code I couldn't find...It's the 2nd part of the code,
@Sloppy Copy MommySend me your template I will do it.
ReplyDeletevhemant03@gmail.com
Not works :( My blog: http://ultimoaggiornato.blogspot.it/
ReplyDeleteCould you help me? Thanks in advance..
@Hemant Verma
ReplyDeletehi can you do that for me too.
I Have followed all your steps it's not working
ReplyDeletewebsite is : http://www. onlinetechtricks.com
but it is working well in
www.demoblog786.blogspot.com
@Syed Muhammad Kashan Ul Hassan Nizamisend me your template here vhemant03@gmail.com
ReplyDelete@Hemant Verma
ReplyDeleteHello !
which website template I have to send ?
Working one or not working template
@Syed Muhammad Kashan Ul Hassan NizamiWhich one is not working
ReplyDelete@Hemant Verma
ReplyDeleteHello Hemant
I have attached my template to your email address. Please Check and sort my problem as soon as possible.
Thanks In Advance
@Syed Muhammad Kashan Ul Hassan NizamiPlz send me again your template be'coz your mail had been deleted accidentally.
ReplyDeleteI again send you the email. Please check
ReplyDelete@Syed Muhammad Kashan Ul Hassan NizamiYa I got it
ReplyDelete@Syed Muhammad Kashan Ul Hassan NizamiNow it's working well
ReplyDeleteLive Demo: http://chking-wg.blogspot.com
Download your template here: https://docs.google.com/file/d/0BwLlzxLZAnSbLXNxODZQWW9GUFk/edit?usp=drive_web
hi, its not also working on my blog. i will send my template to your email.
ReplyDelete@Binibining Wanderlustsure
ReplyDeletehi, its not also working on my blog... help buddy!
ReplyDelete@Anonymoussend me your template here
ReplyDeletevhemant03@gmail.com
I cant find on my template. pls help
ReplyDelete@Chidinma Okafor i mean the second step
ReplyDeletehi! can you fix my template for me?
ReplyDelete@kulasa zenSure Send your template here vhemant03@gmail.com
ReplyDelete