Installed Limit Post plugin

Up until now all the content of a post was being displayed on the index page. I didn’t like it that way and wanted each post to display only a certain number of characters and then have a link to the whole post. There is way to make it work when you use wordpress to create the posts, but I usually don’t do that. Even this post is being made using Blogjet. So I googled and found this plugin which does exactly that…

The only issue is that it’s not been implemented correctly. After certain posts that are truncated with certain HTML tags open, the rest of the document looses it’s formatting, usually getting italicised. I fixed the issue (partly) by editing the plugin. I changed line 40 from
echo "'>".$more_link_text."</a></p>";
to
echo "'>".$more_link_text."</a></em></strong></p>";

This ensure that the open tags for making the text italic and/or bold get closed for sure. It’s a very dirty hack, but has worked for me so far. Also, if you need your site to be valid for XHTML at all times, this is surely not the hack or even the plugin for you.


About this entry