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.

Join the Conversation

1 Comment

  1. I can’t get the plug in to work. I am using Copyblogger theme and tried changing that theme’s index.php as instructed in the plug-in documentation. I get a fatal error as ‘undefined function’

    Where is the function defined? Can you give me or direct me to better step by step instructions?

    Thanks

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.