Expandable Posts

>> Browse templatesMoney tips36 comments

What is it?
The "Read more..." option (aka "expandable posts") allows you to show a shorter version of a longer post, or a summarized version, in the main page of the blog. The readers can then expand the post to its longer full version in the post-page by clicking the "Read more..." button. This option is great if you have posts that are too long to be shown on the main page.

For this code, the "Read more..." link will only show up for the posts that have been selected to show the link, which is a good thing. There are other versions of the code that won't function properly: the "Read more..." link shows up even if you don't want it to show up.

To get all the templates with this Expandable Posts function, make sure the templates are labeled with Expandable posts.

How to use it?
Most of the new templates here have been added with the 'Expandable Posts' code. You pretty much don't have to do anything much. The only thing you need to do is to separate each post you publish into two parts:
  1. The summary part that will show up both in the shorter version and the full version.
  2. The other part that shows up only in the full version in its post-page.
To do this, you first have to click the 'Edit Html' button, and add the following code (in red) into your post editor and separate your post according to the example below. You can continue writing in the 'Compose' mode but the fullpost-separator tags won't show up.

Type your summary here
<span id="fullpost">
Type rest of the post here
</span>

This is how it looks in the Post Editor (with the 'Edit Html' mode):


How to make it easier?
You can make it easier not to type the fullpost-separator tags everytime you post. To do this, go to the Settings --> Formatting tab. At the bottom is the Post Template form. Type in only the code in red above (the fullpost-separator tags) into the Post Template form.

You're done. The fullpost-separator tags will be automatically inserted in the Post Editor everytime you want to post. You can see the tags in the 'Edit HTML' mode to see where to place your posts accordingly.

How to change the "Read more..." text?
You can easily change the text to whatever you want, e.g. "Continue reading...", "[...]", and so on. Just go to the Layout --> Edit HTML tab and click the Expand Widget Templates box. Search for the "read more..." string (the red line below) in the XML code and simply change it to whatever you want. See the example below:


What if I don't want the "Read more..." code?
Delete it. Go to the Edit HTML tab and click the Expand Widget Templates box. Search for the "data:post.body" string (the red line below) in the XML code and delete the code in red only.



<div class='post-body' expr:id='&quot;post-&quot; data:post.id'>

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style>#fullpost{display:inline;}</style>
<p><data:post.body/></p>
<b:else/>
<style>#fullpost{display:none;}</style>
<p><data:post.body/></p>
<span id='showlink'>
<a expr:href='data:post.url'>Read more...</a>
</span>
<script type='text/javascript'>
checkFull(&quot;post-&quot; &quot;<data:post.id/>&quot;);
</script>
</b:if>

<div style='clear: both;'/> <!-- clear for photos floats -->
</div>

<div class='post-footer'>

Credit: The 'Expandable Posts' code by Hackosphere.

36 comments:

Silvi November 08, 2008 10:51 PM  
This post has been removed by the author.
AMbox November 09, 2008 12:42 AM  

Hello. I uploaded your template in my blog. Well, it's nice and I read your article about how to has "READ MORE" in the first page.

And then I created new post in my blog (and upload image in this post too.). When I published my new post, it has "Read More" (That's good.) but many images that I uploaded and wanted to let those images show in my full post only (not in the first page.). Those images are shown in the first page of my blog.

What should I do? If you can solve this, I'll be very grateful.

Thanks.

AMbox November 09, 2008 11:54 PM  

Oh! I can solve my problem. Just delete "/span".

Kae November 11, 2008 10:38 PM  

I have just added this feature to my blog and think it's fantastic. The ability to select the text that appears on the main page greatly reduces clutter.

I would however like more control over how the link appears. How can I adjust the font, size, colour and padding of the 'Read more..." link?

Your help would be very much appreciated.

icha blog November 30, 2008 8:56 AM  

cool....
i want to use for my blog
thanks

admin December 16, 2008 7:48 AM  

Nice tips i use this tips

see my blog http://remixalbum.blogspot.com/

Thanks friend

Μαρια January 15, 2009 5:37 AM  

Wow!!!The best template in the net! Thank you! Thank you so much! I've customized it with my own header and colours and looks fab. I love the versatility of it too! You can almost create any type of look with it! I just love it! You are simply the best!!!!

CONTO DO ESPELHO February 07, 2009 1:52 PM  

Thanks, its very cool in my web blog, thaks for the many possibility of edit by mylsel.

alladin165 February 19, 2009 3:08 AM  

I like this blog, because I'm able to improve my blog, although I'm still a newbie...

Thank's so much..

Bob's Head Revisited March 03, 2009 5:42 AM  

I have this template and am enjoying customizing it. I have the "Read more" button set to show only some of my posts, but what I want is to have expandable posts with expandable images. By that I mean I want my home page to show the posts as thumbnail images and the first para, but the "Read more" link to take you to the full story with the full-size image.
They do it on this site:
http://www.thedailymash.co.uk/

Is it possible in Blogger?
Bob

Bhairavi Andrea March 09, 2009 8:04 AM  

I uploaded your template (again) and for some reason, this doesn't work for me. I can still see the fullpost text and there is no link that says "continue here" or "read more" on my blog. Is there something I'm missing? I reloaded this template to see if there is code that I put in incorrectly and it is still not loading. I really like this read more feature. Please help...

Ryan Green March 14, 2009 10:42 AM  

Thank you so much for your template! I have spent the last week trying to add on hacks to my standard template and it still wasn't right. This template gave me everything I need and it's easy to edit.

Sarto Musik March 26, 2009 10:17 AM  

Hello...I unploud your template in my blog. Thank You Very Much

Miriam April 15, 2009 1:00 PM  

I uploaded the PALM template a while ago, especially for the Read more feature... very good template, easy to tweak for complete HTML dummies like me :-)

Thanks a lot, also for the tutorials!

Alok April 25, 2009 10:24 PM  

Hi, Thank you for this nice tips. you can view my blog at http://alok-mistry.blogspot.com

jerry May 02, 2009 7:01 AM  

Nice
Thank u to made it
i m a newbie
Visti My blog n please give me a suggestion

www.mycelebes.blogspot.com

Adi Riswan June 05, 2009 1:00 PM  

Hi i've used two of your templates,.. and yes it looks greats. thanks guys.. keep good works

bu beng cu June 06, 2009 9:11 PM  

thank's

Aj_Natz June 18, 2009 1:40 AM  

thanks,
feature 'read more' has never been this easy !!!

ladykristinn July 02, 2009 4:08 AM  

Thanks so much for this. I tried to use the instructions in other sites and it didn't work. Then I tried this and it worked. Thanks!!!

The Pit Crew August 02, 2009 1:25 PM  

Great Template I enjoy it alot and it's made my site/one thing on expandable posts I put in both codes and said i didnt have openin code
and tried another way and it said==closing tags have no matching opening tag
HELP what foolish thing did i do wrong

the Brooding Bachelor August 11, 2009 10:00 PM  

I am very grateful for your template. I love it so much and have used it on my site. I tweaked it a little bit to go with my personal style. Not until two weeks, I didn't know anything about HTML and CSS. Your template was the easiest to use and I'm proud that I have taken FULL advantage of its capabilities. I'm sure you'll be proud. :)

Check my site at;

http://www.broodingbachelor.com

LarkAndRaven.com September 26, 2009 9:13 AM  

Awesome! Thank you!
http://www.larkandraven.com

mithu October 29, 2009 3:42 AM  

This is a great utility and has given the blogger blogs more professional look and feel. I,m already using it with one of the professional templates I downloaded from your site. You can see it in action at my Make Money Online site - www.MakeMoneyOnline24Hrs.com.

Bia Estilosa October 30, 2009 5:32 AM  

Bem, amei o modelo, mais infelizmente não consigo arrumálo.
Está com 2 colunas, as imagens não carregam, aff é muito desanimador, por favor me ajude!
Veja como fica: biaestilosabolsas.blogspot.com

the simpsons November 20, 2009 2:01 PM  

please how to add a picture in the body please i need your help and thanx for the theme its so wonderful i love it

Ian F. December 02, 2009 2:13 AM  

The expandable posts functionality doesn't seem to work correctly in Safari (for Windows) and Chrome. I have one post that shows in full in those browsers but shows only the summary in IE and Firefox. The only different thing about that post compared to others that work is that it's the only one with 2 embedded images but the summary doesn't include either of the images so I've no idea what the issue is. What's more, it shows the "Read More" link at the end of the full post!

Gina December 18, 2009 9:48 AM  

Could you possibly make the "read more" feature compatible with the Blogger Jump Break? I've tried using their code to make it work with your templates, but have not had any success doing it that way.

Gina December 19, 2009 4:14 PM  

I'm having somewhat the same problem as the previous person, i.e., in Safari it works on some posts but not on others. It's fine in Firefox though.

And another problem I'm having with having it itself automatically is that if I make the slightest edit to the post afterwards, the thing goes crazy and inserts itself everywhere. So I've removed it from the Formatting "post template" box and I just put it in by hand where I want it.

No big deal, it's a great feature for a great template: I just thought you'd like to know about these bugs.

Mark Laurence January 03, 2010 5:12 AM  
This post has been removed by the author.
Mark Laurence January 03, 2010 5:12 AM  

Hi dear there. Can you help me out please. I cant seem to make the expandable post work on my template, by the way I used your Perfection template. I did all what you instructed above but still cant make it work.

JKCatering January 05, 2010 1:30 AM  

I uploaded your template proffessional and it is perfect . But i CANNOT GET the read more option to work. It keeps putting it at the bottom of the page without haveing to click on anything an i have tried doing what you said but it is wrong. Why cant i keep my original read more code for this or use page break in tool bar? Can you help please as it looks like my posts end way before they do. www.moodfoodblog.com

Michelle January 19, 2010 6:37 AM  

This si the second of your templates I have used... One question how do I get a picture to show behind my Blog title. Like in the example I used? When I uploaded the picture went away....

what do you all think?
http://coldtoesinmi.blogspot.com

Manjunath January 25, 2010 9:25 AM  

really super idea

Gordon Wales February 20, 2010 11:44 AM  

Nope, 'more' just doesn't work in 'Shush'. I have spend hours going carefully through every bit of advice given as to how to make it happen, but it doesn't. I can get 'more' at the end of the first, shorter section, but no way does the second section come up when I click on it. I simply get a repeat of the shorter section with the very end of my post thrown in for good measure. I like the template too much to leave it, and so I will struggle on. If someone can help me fix the problem I would be most grateful.Thank you.

Gordon Wales February 21, 2010 5:56 PM  

I must say that though I have spent hours during the last three days trying to tweak 'Shush' to allow 'read more' it just does not work properly, only repeating the shorter section, going nowhere.
I am sorry about that because it is a great template. I downloaded a template from Blogger Blog Templates (The Essayist) and it worked perfectly, right off the bat!I just clicked the torn page and presto! it worked. So, what could be wrong in 'Shush'? It is disappointing for me because 'Shush' is structured perfectly for my writing Blog and was the answer I had been looking for. No other site offers anything near it. It is really tops and I'll keep using it even though the posts are very long. Ah Well! You have really great templates and oodles of great advice articles which, I am fully aware, are generously offered free; I am in no ways knocking your work. All I ask is why does 'Shush' not stand up to the other excellent templates you offer? Sincerely