Sunday, February 11, 2007

LJ Style Cuts For Blogger

A quick and dirty hack to "hide" the majority of a post on the main or archive pages.

Detailed instructions contained with in. Read More

To add the "preview" and "fullpost" functionality you will need to edit your template. From the Blogger Dashboard, click on the Template link.

You'll want to backup this incase anything goes horriably wrong. If you do not know how to do this you can just skip backing up. No one ever does that anyway.

Find the tag <style type="text/css"> and enter the following:

<MainOrArchivePage>
span.fullpost {display:none;}
span.preview {display:inline;}
</MainOrArchivePage>
<ItemPage>
span.fullpost {display:inline;}
span.preview {display:none;}
</ItemPage>

Now create and post your large entry to your weblog. After it is posted, copy the direct URL to the post. To create the "Continue Reading" link, edit the HTML of the past and add the following syntax:

<span class="preview"><a href="link-to-post">Continue Reading</a></span>

After this, slap <span class="fullpost"> ... </span> around the chunk to be hidden from your main page. It should be clear that anything with "preview" tags are only displayed on the index and archive pages, and anything with "fullpost" is displayed on the post page. Go nuts.

I'm aware are better ways to do this. This works well enough for Blogger and me.

Labels:

0 Comments:

Post a Comment

<< Home