Want Excerpts in Recent Posts?
Posted by Joe Hauckes
If you're new here,
You may want to Subscribe to my RSS Feed or if you prefer ... Subscribe via e-mail. Thanks for visiting!
If you have been here before, you may notice a little change in the Sidebar. In the top section for Newest Blog Posts there has been links to recent posts, but it was just the Titles. Nothing to let readers know what the posts were about other than a few words.
I have tried various ways to enhance the description but have always fallen short of what I wanted to give readers as a preview. Using a combination of 2 different plugins, I still could only come up with one excerpt for the newest post, but had to rely on the old fashioned Title for the rest of the current posts.
I finally found a plugin, SimplePie Plugin for WordPress, through the recommendation of a friend and thought I may as well try it because no combination of plugins would give me what I wanted.
It works really well, but they make it a little more complicated to get the download(s) than is necessary. When you get to the landing page, you download their .zip file, but it is only one of 2 that you need to run the php. You have to go to the “download” in the top navigation bar and download another .zip file separately in order for the plugin to work.
After unzipping both files (separately and in different folders) the one for the actual php file (simplepie_wordpress.php) is easy enough to find and upload from the 1.2.1 folder. The other file you need is the library of information to allow the whole thing to function. The file (simplepie.inc) in the 1.0.1 folder is a little more difficult to find because it is mixed in with a lot of files you don’t need for anything (unless you like to read). Once you find the .INC file, it is also easy to upload.
Then you have to create an empty folder, cache, to use as a holding place for the current information (new posts).
If they put everything you need in one download, it would be a lot simpler to install.
Once you get through the ordeal of this process, the rest is easy.
After you upload the 2 files and create the cache folder in your wp/plugin folder, activate the plugin on your WordPress Blog.
Go to the section you would like the excerpts to show and place the following code:
<?php echo SimplePieWP(’http://example.com/feed.xml’, ‘items: 5, shortdesc: 200, showdate: j M Y’); ?>
You can adjust the “items”, “shortdesc” if you would like you can even remove the date.
The output will default to an Ordered List (numbered). If your want to change it to an unordered list, you need to be comfortable with changing the Plugin php. Don’t attempt it if you don’t know what you are doing, you might break it.
Related Posts:6 Responses to “Want Excerpts in Recent Posts?”
Trackbacks
Leave a Reply





September 12, 2007 at 2:40 pm
Woohoo! Thanks for testing it and getting it to work!
It does look way better than the other way (with just title links) and I’m glad I was able to put my obscure internet searching talents to good use
// Thanks for the link.
September 12, 2007 at 2:54 pm
Hey HART,
I thank you for suggesting I try it out. As you can see it Does Work!
The link is the least I could do for your obscure internet searching talents successful searching skills.
Thanks.
September 19, 2007 at 12:12 am
Hey, this is Ryan from the SimplePie project. At the moment, we have the simplepie.inc file separate from the WordPress plugin mostly because the plugin is only ONE use, and you can do a whole lot more with the core SimplePie library.
At the same time, we always want to make things easier for our users, and you’ve brought up a really good point. I’ll see what I can do about making this process even easier.
Thanks for the feedback.
September 19, 2007 at 8:06 am
Hey Ryan,
).
I really like the plugin, and it is really easy to use once the download is done.
It is exactly what I needed to give the readers a preview of the current posts, expecially using a static landing page.
Thanks for all your good work, and for stopping by to let us know what’s going on.
(Now I have to check out the whole library
October 21, 2007 at 5:00 pm
Great to see your solution; I’ve used SimplePie on a Textpattern site and now have a WordPress site I want to use it on. Unfortunately, I receive error messages that the first argument needs to be in an array. I re-visited the SimplePie WordPress plugin site and saw their instructions indicate an array should be used.
Tried their solution, and I still am getting errors.
Here’s the error message:
Warning: extract() [function.extract]: First argument should be an array in /home/xxx/public_html/union/wp-content/plugins/simplepie_wordpress_2/simplepie_wordpress_2.php on line 523
October 21, 2007 at 5:24 pm
Hey Deborah,
I saw some errors that were quite similar. Did you try the one I presented?
It worked for me, it could work for you.
Let me know, I am very interested in how these things work for others.