Expandable Post Summaries…add read more link in posts

Expandable Post Summaries is the method by which each blog post consists of a short paragraph of introduction followed by a ‘Read More’ link. This enables the reader to get a small introduction to each post on the main page. He can then click the Read More link if he gets sufficiently interested……..

There are basically three steps to follow if you want to implement expandable post summaries in the new layouts template.

CONDITIONAL CSS

The first step is to put the code for the conditional css. This changes how posts display on different pages. To do this login to Dashboard and click on Layout for your blog. Then click on Edit Html and first backup your template by using the Download Full Template link. Then scroll down till you come to tag and add the following code immediately above it :

Save Template.IMPORTANT NOTE in the layouts template there is a ]]> tag just above the tag. Add the above code so that it lies between these two tags. What we did here was to define a class called “fullpost” that will appear only on post pages.

“READ MORE” LINKS

The second step is to add the Read More links which will appear after the paragraph summaries. To do this put a check in the Expand Widgets Template checkbox at the top of the Edit Template text box.

This is in the Edit Html subtab of Template tab. Then scroll down in the code till you come to the Blog Posts Widget code where locate this line of code :

Add the code below immediately after the above code :


Read more!

Save Template

POST MODIFICATIONS

The last step is to modify the post template so that each post when created will show you where to place your summary paragraph and where to place the rest of the post. To do this go to Settings——>Formatting and scroll down to the end of the page to the box for the Post Template. Copy and Paste the following lines there :

Here is the beginning of my post. And here is the rest of it.

Save Settings.

Replace the line “Here is the beginning of my post.” (Type your summary here) with your summary paragraph. Then replace the line “And here is the rest of it.” (Type rest of the post here.) with the rest of your post.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *