Skip to main content

Auto Read More With Thumbnail For Blogspot Blogs

Read more for blogger

Normally, A read more button becomes visible in your blog's homepage when you add a jump break to your posts.

When posting an article from your blogger admin panel, you have the option of  adding jumpbreak any where you want by just clicking the jumpbreak button but when using an application, you have to manually add the <!--more--> functionality to your post's html ...

Most times we get too Lazy to click on the jumpbreak button or add the !more functionality and for that reason, we need an automated helper...

This auto read more functionality is highly customizable to your taste and you don't have to be left hanging out with a boring read more button because you are going to have absolute control over whatever phrase or word you wish to use directly from your blogger admin panel.




Now to begin adding auto read more functionality to your, back up your template.

You should always backup your blog template before tweaking... you might want to revert back to the old looks. 

From your Blogger dashboard, go to Template and click on the Edit HTML button and search for </head>.

Just above  </head>, paste the code below

<!-- Auto read more script Start -->
<script type='text/javascript'>
var thumbnail_mode = &quot;yes&quot;; //yes -with thumbnail, no -no thumbnail
summary_noimg = 430; //summary length when no image
summary_img = 340; //summary length when with image
img_thumb_height = 200;
img_thumb_width = 400;
</script>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTagundefinedstrx,chop){
 ifundefinedstrx.indexOfundefined"<")!=-1)
 {
  var s = strx.splitundefined"<");
  forundefinedvar i=0;i<s.length;i  ){
   ifundefineds[i].indexOfundefined">")!=-1){
    s[i] = s[i].substringundefineds[i].indexOfundefined">") 1,s[i].length);
   }
  }
  strx =  s.joinundefined"");
 }
 chop = undefinedchop < strx.length-1) ? chop : strx.length-2;
 whileundefinedstrx.charAtundefinedchop-1)!=' ' && strx.indexOfundefined' ',chop)!=-1) chop  ;
 strx = strx.substringundefined0,chop-1);
 return strx '...';
}
function createSummaryAndThumbundefinedpID){
 var div = document.getElementByIdundefinedpID);
 var imgtag = "";
 var img = div.getElementsByTagNameundefined"img");
 var summ = summary_noimg;
        ifundefinedthumbnail_mode == "yes") {
 ifundefinedimg.length>=1) {
  imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="' img[0].src '" width="' img_thumb_width 'px" height="' img_thumb_height 'px"/></span>';
  summ = summary_img;
 }
 }
 var summary = imgtag   '<div>'   removeHtmlTagundefineddiv.innerHTML,summ)   '</div>';
 div.innerHTML = summary;
}
//]]>
</script> 

once you've pasted the code above, search for 
<data:post.body/>

if you are using the default blogger template, you will find the code above twice but there may be more. 

this is what the second occurrence looks like. 

      <data:post.body/>
      <div style='clear: both;'/> <!-- clear for photos floats -->
    </div>

    <b:if cond='data:post.hasJumpLink'>
      <div class='jump-link'>
        <a expr:href='data:post.url &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
      </div>
    </b:if>


so you are to replace the <data:post.body/> in that code with the code below... 

<!-- Auto read more Start -->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<data:post.body/>
<b:else/>
<div expr:id='&quot;summary&quot;   data:post.id'><data:post.body/></div>
<script type='text/javascript'> createSummaryAndThumbundefined&quot;summary<data:post.id/>&quot;);
</script>
<a class='more' expr:href='data:post.url'><b><div class='jump-link'><data:post.jumpText/></div></b></a>
</b:if>
</b:if>
<!-- Auto read more End -->


after you've successfully replaced the code, you can delete 

<b:if cond='data:post.hasJumpLink'>      <div class='jump-link'>        <a expr:href='data:post.url &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>      </div>    </b:if>

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 ...

An Unbiased Infolinks Review

Today, I will be going over the adnetwork, infolinks.com in my own way. let's find out if it is a good adsense alternative or one that can be used with adsense. Discovering Infolinks I found out about infolinks while searching for AdSense alternatives when I was unable to get AdSense approved for my account, Then I applied with my previous blog but darn, the blog probably did not meet their demands and I was never approved. Few months laters I got AdSense approved for my blog but that didn't live long enough, to my detriment and after been blown off by the infamous Adsense Disablement ish (made me ditch my previous blog)... Months after setting up my new blog, I had to look for an AdSense alternative, and every research I made, didn't exclude Infolinks, and this made me think highly of them and so I had to give an application another shot, this time within a day, I got approved to display ads on my blog... Bam! Such a nice achievement... Getting To Understa...