Deluxe Blog Tips About Projects

Blogger: Auto readmore script improved with many options

The auto readmore script is first created by AnhVo at (the website is not available now). Based on this idea, I create a new auto readmore script with more options:

  1. Add default thumbnail image when posts don’t have any images.
  2. Option to turn off auto readmore for some first posts.
  3. Option to turn on/off auto readmore for homepage and label page.

How to install

Go to Dashboard → Layout → Edit HTML, check Expand Widget Templates. Find </head> and insert this code before:

<script type="text/javascript">
var summaryConf = {
    showImage: true,
    imgFloat: 'left',
    imgWidth: 120,
    imgHeight: 90,
    defaultThumb: '',
    words: 65,
    wordsNoImg: 80,
    skip: 0,
    showHome: true,
    showLabel: true
<script type="text/javascript" src=""></script>

After that, find this line in your template:


Replace with:

<span expr:id=''><data:post.body/></span>

<b:if cond='data:blog.pageType == "index"'>
    <script type='text/javascript'>summary("<>")</script>
    <b:if cond='data:blog.pageType == "archive"'>
        <script type='text/javascript'>summary("<>")</script>

That’s all! You can refresh your blog and see how it works.

How to change options

The options are very easy to change. It’s declared in the first part of script above. These are their meanings:

showImage: do you want to show thumbnail? If yes, set it true, if no, set it false.

imgFloat: there are 3 values of this option: 'left' – float thumbnail to the left, 'right' – float thumbnail to the right and 'no' – no thumbnail float. Note the quotes around values.

imgWidth and imgHeight: thumbnail size.

defaultThumb: default thumbnail URL, used when posts don’t have any images.

words vĂ  wordsNoImg: number of words shown in summary when have thumnail and no thumbnail.

skip: skip some first posts, don’t apply auto readmore for them. If this option is set to 0, all posts are applied auto readmore.

showHome and showLabel: allow or not auto readmore for homepage and label page. true is allowed, false is not.

Adjust these options to fit your blog and enjoy!

Subscribe to the Newsletter

Subscribe to get my latest content by email. I won't send you spam. Unsubscribe at any time.