Welcome, visitor! [ Login | Sign Up ]

How To Add The Blogger “Read More” Expandable Posts Link



This is a pretty popular Blogger hack that lots of people have asked me about. Instead of answering to each email individually, I thought it would make more sense to write an article about it.

With this hack, you can choose to display a select amount of text from the beginning of each post as a teaser instead of showing the entire post on the front page of your blog. Then when people want to read the rest of the post, they can click a “read more” link to see the full post. This is very handy if you have lots of long articles all on one page. (Note that you’ll need to have post pages enabled in order to make this feature work.)

Step #1 – Update Your Template Code

First you need to edit your existing code so I recommend copying and pasting it into notepad or any text editor. Also, it’s smart at this point to create a backup of your template just in case something goes wrong. Now do a search (CTRL + F) within the text editor for the following code post-header-line-1. This is the default code that Blogger includes but some custom templates remove or change this code so you might have trouble finding it. If you can’t locate this text then try searching for <data:post.body/> instead. Your template will for sure have this since it’s the tag that actually prints the body of your post.

Now depending on which code you were able to find will determine how easy the next steps will be. You might need to do some detective work first in order to get this working properly in your custom template. The idea is to get this new code into your template before the <data:post.body/> tag. Keep reading and hopefully the explanation will illustrate the concept clear enough so you are able to adapt this hack to your custom template.

Add the following code below the <div class=’post-header-line-1’/> and <div class=’post-header-line’> tags if you’ve got both.

<b:if cond='data:blog.pageType == "item"'>
<style>.fullpost{display:inline;}</style>
<p><data:post.body/></p>
<b:else/>
<style>.fullpost{display:none;}</style>

The result should look something like this:

new-code-block.png

If you don’t have the default <div class='post-header-line-1'/> tag then your result should look something like this instead. This is how it would be done in the MushBlue Blogger custom template:

new-code-block-mush.png

Notice in both examples that the code in yellow and the <data:post.body/> tags are the same — it’s just tag above it that will differ based on the template you’re using.

Now let’s add one more bit of code which will actually create the “read more” link in your post. This code will go below the <data:post.body/> tag so copy the following and paste it in. Feel free to change the “Read more…” text to whatever you want the link to look like. Be careful not to delete any other code during this process.

<b:if cond='data:blog.pageType != "item"'><br />
<a expr:href='data:post.url'>Read more...</a>
</b:if>
</b:if>

Yes, there are supposed to be two </b:if> tags in the above code so don’t think it’ s a mistake. The result should look like this:

new-code-block-2.png

This code will be the same no matter what template you are using. Just make sure it goes below the <data:post.body/> as shown in the image above.

Now let’s look at what the final result should be. Here’s the updated code block you just worked on all put together:

new-code-block-3.png

Ok, you’re all done editing the template code. Paste it back into your Blogger html window and save it. If you get an error, you made a mistake. The most common mistake is to accidentally delete a > or < while pasting in the new code. If it saved successfully, it’s time to move onto the next step and modify a quick Blogger format setting.

Step #2 – Add a Class Tag in Your Default Post Template

For this step, you need to navigate in your Blogger account to “Settings” => “Formatting” and scroll all the way down to the bottom. It’s the last option called “Post Template”. You’re going to paste in the following code:

<span class="fullpost">

</span>

You’ll want to keep the spaces in there which will make sense later. After you save this, it will look like this:

post-template2.png

Step #3 – Create a New Post

Ok, we’ve got everything all setup so it’s time to go and test it out. Hopefully you’ve got a new post in mind for your blog. If not, then we’ll just create a test post which you can later delete. When you click on the “Posting” tab, you’ll notice that the post text area is now pre-populated with the <span class=”fullpost”> and </span> tags. If not, then you didn’t save it properly so go back and re-read step #2.

So when writing your new post, anything you put above the <span class=”fullpost”> tag will be the teaser text. The main body of your post needs to go in between the <span class=”fullpost”> and </span> tags in order for the “read more…” link to work properly. See the screenshot below. Sometimes pictures illustrate better than words.

post-template-result2.png

Now publish or preview your post to see the “read more” hack working on your blog. If it doesn’t show up for some reason, go back and run through the steps again. Most likely you pasted the code blocks in the wrong places. It’s difficult to troubleshoot these issues since each template can be unique so please make sure to double-check your template before asking for help in the comments section below.

Here’s the live post with the “read more…” link properly working based on the text I used above in the post text area.

post-results.png

Additional Info

If you want to go back and update your old posts with this new “read more…” feature you can. Just go back and edit each post manually. Essentially you’ll need to paste in the <span class=”fullpost”> and </span> tags breaking apart the post into two parts.

For some posts, you might not want to use this feature at all. If that’s the case, just delete the <span class=”fullpost”> and </span> tags from within your new post text area. Then your new post will show up entirely just like it used to before you implemented this hack. Enjoy!

Ready to super charge your blog? Check out our professional premium blogger templates or make money by joining our blog affiliate program!

If you like this post then please consider subscribing to our eBlog Templates RSS feed. You can also subscribe by email and have new templates and articles sent directly to your inbox.




Trackbacks

  1. e[lust] | Insatiable Desire on November 6, 2009
  2. Read More hack for Blogger with automatic Thumbnail creator script @Smashing Tips on January 3, 2010
  3. How To Add Automatic Read More Hack For Blogger With Thumbnails : Fropker.Com on March 20, 2010
  4. Read More hack for Blogger with automatic Thumbnail creator script | Blogger Dummies on April 19, 2010

578 Responses to “How To Add The Blogger “Read More” Expandable Posts Link”




   
Sanatate on Nov 7, 2009, 9:13 am  

Useful info. thanks


   
WWNN on Nov 7, 2009, 11:47 pm  

this is really useful and helpful specially for blogspot blogger. Thank you so much for creating this nifty and easy-to-understand tutorial. 🙂


   
alexa on Nov 14, 2009, 5:20 am  

Hello, How can I change the readmore text link becomes read more permalink.. ?

the example is this blogspot : newsalls.blogspot.com

Please help me … Thanks…


   
Chenine de Groot on Nov 19, 2009, 4:18 am  

Thanks for this amazing tutorial! Maybe a new feature for seo and usability: Add title tag to read more and the h3 link tag:

instead of:


   
Chenine de Groot on Nov 19, 2009, 4:19 am  

Hmm error in my message.. it should be:

replace: a expr:href=’data:post.url’

with: a expr:href=’data:post.url’ expr:title=’data:post.title’


   
Della on Nov 22, 2009, 3:04 am  

I DO NOT HAVE EITHER OF THOSE CODES ON MY BLOG TO EVEN EDIT THE HTML AND POST THE CODES YOU ARE TALKING ABOUT IN between. What do I do?


   
Chenine de Groot on Nov 22, 2009, 11:25 pm  

Maybe try to check the checkbox Expand Widget Template (in Dutch its called: “Widget-sjablonen uitvouwen”). It’s above the textarea where the code is in.

P.s. you’re shouting…


   
puspita on Nov 24, 2009, 1:44 am  

Hi… It doesn’t work like it should be.
I’ve tried to edit html on the layout and “read more” link appear in the last post.
It is possible to edit my previous posting with “read more” link?

my blog puspita-dreams.blogspot.com
Please help…


   
Melow on Nov 27, 2009, 10:50 am  

I’m using iTheme templete and this templete doesn’t have either of or

can u help plz?


   
News Portal on Nov 28, 2009, 4:22 pm  

Hy,

Can anyone suggest me a good template for my news blog?


   
WChinner on Dec 2, 2009, 11:30 pm  

This result of this method only works for Internet Explorer browser. Other browser like Mozilla does not reflect the result.

Thanks.


   
Orangutans on Dec 3, 2009, 7:25 pm  

Hi all,
Thanks for a great code. Really works. Also on Mozilla, don’t know what your problem was WChinner? The problem many of you are having i think, is that you haven’t clicked the “expand widgets” tab. you must do that before looking for the codes.
The only problem i am having is that all my photos are showing in my summary, does anyone know what I am doing wrong? Would really appreciate all help:
http://www.orangutans-sos.org/blog
Thank you


   
discount uggs on Dec 4, 2009, 9:59 am  

   
WChinner on Dec 4, 2009, 11:40 pm  

Hi OrangUtans;
Yes, i did click an expand widgets tab before putting in the codes.
Another finding from a test:
I used apple safari browser to modify my blog with the ..”read more”… and it worked.

Strange and i don’t know why…


   
seo india on Dec 4, 2009, 11:45 pm  

This is really good resource for blog beginners and user friendly blogging idea. I have forward your article to my various student.

Nice post…please add my email id in your newsletter and send good stuff.

thanks


   
WChinner on Dec 4, 2009, 11:54 pm  

To OrangUtans (again);
On your problem of having your photos in the summary. I noticed that all your pics are right indented. Not sure if that’s the problem. Try changing the format and see.
Also you need to select which point to place your . did you put it before your pics?
hope this helps.


   
spartax on Dec 12, 2009, 11:57 pm  

thanks, I adopted in my blog,, works great…


   
Aries on Dec 21, 2009, 6:06 am  

Hi, i try the procedure above this page but i have this problem occur.

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type �b:if� must be terminated by the matching end-tag �

please help me to this problem, please email me at kutsaraband2009@gmail.com


   
xtan on Dec 24, 2009, 3:18 pm  

Hi!!

will this work also to page element…?


   
mikebuyco on Dec 24, 2009, 10:45 pm  

Hi I tried doing this but the result came was my front page went blank and no page to display. Any updates on this?


   
promotemylinks on Dec 29, 2009, 5:02 pm  

Thanks a lot for your tutorial.


   
far sid on Jan 2, 2010, 3:40 am  

man thanks a lot… really worth…


   
kyawnaingsoe on Jan 9, 2010, 8:17 pm  

Thanks for your very useful post. I want to translate your post at my blog. Can I?

Sincerely,


   
mamata on Jan 15, 2010, 6:39 pm  

thnx
it really work for me.
i was searching from long time


   
dare dorm on Jan 17, 2010, 1:02 pm  

thats very great..execilent..


   
Moinu on Jan 25, 2010, 7:37 am  

Thank you for this. This article helped lots of people and I’m of’em. I struggled little bit but in d end I d end I did it. Yes 🙂
problem was… 1st I didn’t find the DATA:POST etc (you gotta check the EXPAND WIDGET TEMPLATE)
next, last I didn’t see d SPANs!! (I need to write it in EDIT HTML) 🙂


   
Sachin on Feb 2, 2010, 1:08 pm  

Thanks…….
it really work for me.


   
Syaza on Feb 3, 2010, 3:10 am  

Hello. i’ve tried it, and it works. however, the “read more” thing still appears in my short post, which i do not need the “read more” thing… and i’ve deleted the “span” tags too..


   
sean chapple on Feb 3, 2010, 7:47 am  

Great tutorial, just trying to get Read More to open in the same window with others posts remaining below? And maybe add a ‘summary’ to reverse the action?


   
khaled on Feb 13, 2010, 8:02 pm  

thx its very nice


   
Guy Siverson on Feb 16, 2010, 9:19 pm  

I’ve used this code with success on past blog creation. Having trouble this time. If I include just the title it works fine. If I try to include the title and a snippet of information I end up with two snippets with the “read me” link in between the content.

Help!


   
Click On Portal on Feb 19, 2010, 9:18 am  

I don’t actually know how I’m going to post my problem because it’s a very long html, I mailed it, but that’s the wrong way so I’m sorry about that. ( I really didn’t see that it’s only for ads!) I just don’t want to place that kind of lengthy information.


   
Click On Portal on Feb 19, 2010, 9:45 am  

Please, Please delete my other comments, I promise that I am not trying to spam! Here is the link to the shortened code I have a problem with:

http://icysprinkle.livejournal.com/5259.html

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
“Your HTML cannot be accepted: Closing tag has no matching opening tag: SPAN”


   
Mr Mizo on Feb 22, 2010, 3:22 am  

Hello! Thanks 4 sharing!


   
Wilsan on Feb 27, 2010, 11:33 pm  

Two snippets with the “Read More” link under each post.
Same issue listed here with Guy Siverson.
Did you get a fix to this issue guys?
Thnks, for helping


   
Gwei Mui on Mar 6, 2010, 1:15 pm  

Hi there wonder if you can help me out. Just switched over to using Magzmo template it’s great. I’ve added three pages but the read more doesn’t work on any of the pages that I have added what Have I missed, or what haven’t I done that I need to, to get this to work on all my added pages. Thanks


   
apples on Mar 11, 2010, 10:04 am  

This simply removed all the posts from my blog’s homepage…

*retracing my steps*


   
Sankalp on Mar 11, 2010, 8:16 pm  

I have this error message.

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type “div” must be terminated by the matching end-tag “


   
Roman printre straini on Mar 18, 2010, 5:26 am  

If I need to move “Read more…” in right place I can do?


   
ger on Mar 19, 2010, 4:57 am  

really helped me. thanks alot


   
Saran on Apr 3, 2010, 1:23 am  

Wow really works, thanks a lot. Very user friendly description . Great work .Keep it up.
Just now i implemented it in my blog
enga-area.blogspot.com


   
lenNY's Yankees on Apr 4, 2010, 11:50 pm  

Hello,

This works great. The only problem I’m having is when I want to make a post without the “read more…” text. If I try deleting the span and fullpost codes like the directions say, the “read more…” publishes anyway. Please let me know what I’m doing wrong in the comments or feel free to e-mail me.

Thanks,
Lenny


   
Hussein on Apr 11, 2010, 12:11 pm  

hi,

first of all, thanks a lot for this great post but I have a question if you don’t mind, how can I use what you already explained in case I am using Windows Live Writer?

thanks once again.


   
Jack Morak on Apr 19, 2010, 1:22 pm  

hello david
I’m using langit template

And I do What u say step by step ….But It doesn’t work ….
I wish u anser me soon pliiiiiizz

thank you


   
dur14t on May 5, 2010, 7:52 am  

Thank you, now “read more” in my blog already installed.


   
World news on May 15, 2010, 9:07 am  

nice thanx i like ur site