Many of us, in our endeavour to bring out the best in our blogs try and put as many tips or thoughts into a single post. Well this isn't particularly going to be welcoming to a person who has come for the first time to visit your site.
So here we are going to discuss a way in which you can trim the post and leave a 'Read more' link at the bottom. When the reader clicks on it the post will autimatically lenghten and the rest of the post will be visible. Again the reader has the oppurtunity to trim the post again with the summary only link at the bottom.
So lets get to the point:
1)Download and save your template so that you can go back to it if there is any problem with this hack (Important!)
2) Find the </head> tag in your template and add all the code from this page before it.
3) Find the includable called 'post' and copy/paste the changes highlighted in red in this page (Be very careful and avoid mistakes. Note that the word "uncustomized-post-template" may not appear in your template but that's fine. If such is the case then put a
</div>
tag before
<div style='clear: both;'/> <!-- clear for photos floats --> </div>
To find the includable, you could search for the term id='post'.
If you are not able to find it, you may not have expanded the template. Select the checkbox
named "Expand Widget Templates", which is right above the template code, to expand it into more
code.
4) Goto Settings->Formatting and at the bottom, you will find the text box provided to specify the "Post template". Copy/paste these lines into that text box and save the settings. (Please DON'T type these lines yourself because you might introduce some spaces that will break the functionality)
Type your summary here
<span id="fullpost">
Type rest of the post here
</span>
If you create a new post now, it shows you clearly where to type the summary and where to add the rest of the post. It is important to make sure that the /span tag above is at the end of the post. To ensure this, use Edit Html tab instead of Compose tab while typing the post. After typing, you can go to compose mode and change fonts/colors etc. Please note that you could also divide some (or all) of your old posts into summary and full post by editing them. The "Read more" link will appear only for the posts that have been divided like this.
0 comments
Post a Comment