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

Beautify Your Blogspot Blog With TESH, A Premium Premade Blogger Template

If you've been looking for a stylish template for your blogger blog, then you'll definitely love the look and feel of "Tesh", a classic, chic, as well as black and white premade blogger template, suitable for personal, fashion, lifestyle bloggers as well as other bloggers. Tesh is not only classic but responsive and has been built to beautify your blog's view... If you've been looking for a minimalist blogger template that isn't heavy but lightweight, then tesh is perfect just for you... No fuss, she's worth your thoughts and utilization. Note: This is a blogger template, it wouldn't work on WordPress, tumblr or any other platform but blogger. Demo - http://www.tesh-demo.blogspot.com Features of Tesh ~ Responsive layout ~ Auto read more button ~ Breadcrumbs in post page ~ Related posts widget ~ Classic share buttons ~ Stylish about me widget ~ Beautiful labels design ~ Numbered page navigation ...

Just Another Way To Save With A Piggybank

While growing up, I wished for a piggybank, despite having access to numerous saving boxes. Trust me, I always thought a piggy bank would be great and advanced than a square box! At least it wasn't our conventional DIY savings method. But then, what if my dream had come true, maybe not at the time I wanted it but sometime later? I'd probably save and get to destroy my bank! Piggybank is a generic English term used to denote the earliest means of storage of money, using a hollow ceramic statue of a pig. Well, did you ever use a savings box and wished for a Piggy bank? It's probably time to stop being archaic and get digital because, there's a Piggy bank in town who's gone so digital. About piggybank.ng In a brief note, Piggybank.ng is a Nigerian Financial Technology (Fintech) startup which run a hassle free online savings scheme. Piggybank if granted access to a user's bank account will make periodic deductions for the purpose of saving towards a target. This inn...