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

30 Days On A Confused State of Mind: #DAY1: Discovering My Self Worth

#Day1 Hello dear and welcome to the first day of my confused state of mind mindboggling findings. This is not just a step discovery challenge but its also more like a 30 days blogging challenge for me, as well as a plot to overcoming some procrastination ish. I only hope I don't get tired too soon! It's only the first day and I already feel worse than Garfield! Telegraph.co.uk Now, lets head over to the First Topic of my 30 days challenge. It absolutely wasn't thought through but there was no need to think it through because it came in like a flash and “Discovering My Self Worth”, was the first issue I could Point out of my may overwhelmed thoughts! On Discovering My Self Worth There are too many unanswered questions, Ones that have weighed me down over the years and others with answers I've refused to hold on to (I rather not be told the truth). If you've had issues with loving yourself, then the word self-worth shouldn't be so stran...

How to get a Payoneer Account For Receiving and Making Payments Online (Best Paypal Alternative)

Paypal is the most popular online payment processor and about 98% of websites make use of it to pay workers and publishers. Paypal is the best when it comes to receiving money and making payment but this flexibility have not been made accessible to some countries. While some don't have access to Paypal at all, others only have access to it as a means of making payments and not receiving payments. Now this is very sickening because such restriction impedes the chance of making money online. How are you going to get paid after all your struggles? As a Blogger and Affiliate Marketer or someone that works online, you will definitely need to get paid for the services you've rendered with or without a PayPal account! You've probably always paid someone to receive your cash which in the long run reduces your money. But not to worry, there's always a way out. There are tons of paypal alternatives , and they've been discussed previously, but here, we will ...