Automatic Read More for your blog

This tutorial will help you to insert in your blog a automatic read more.

We have to choose the number of characters after which the post will be truncated. If we choose 400, only show the first 400 characters.

Here we go:

Log in to Blogger, and go to Layout->Edit Html and mark the Expand widget templates Box.

Now find (you can use Ctrl+F, to search it faster) this template code:

And insert before that code, the next code:

<script type='text/javascript'>var thumbnail_mode = &quot;no-float&quot; ;
summary_noimg = 500;
summary_img = 450;
img_thumb_height = 100;
img_thumb_width = 120;
<script src='' type='text/javascript'/>

You can change the items in blue. If your post dont have a image, then it will show 500 characters.

Now we have to find this code

And replace it, with this code:

<b:if cond='data:blog.pageType == "item"'>
    <b:if cond='data:blog.pageType == "static_page"'>
            <div expr:id='"summary" +'>
            <script type='text/javascript'>
            <div style='clear: both;'/>
            <span class='rmlink' style='float:right;padding-top:20px;'>
                <a expr:href='data:post.url'> Read More... <data:post.title/> </a>

Now save the template, and enjoy your read more.

Note: How you can see, the JS file, is in that location, but i suggest you, to download and save it somewhere else, because we never now.

Upload the file to :
I recommend this one MyDataNest

NOTE: You must set your folder as 'Hidden' and not 'Private', and after that is copy and link and paste it in your code.


0 comentários:

Enviar um comentário