What would be the simplest way to incoperate 5-10 of the latest weblog posts into my website? Should I strip the rss feed only to show the latest 5-10 posts or use php to pull them?
Thanks
simplest way to show weblog posts
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
You could also use the s9y API to show your entries:
You could look into include/functions_entries.inc.php and look at the function signature to see what you can do with that function 
Regards,
Garvin
Code: Select all
<?php
chdir('/path/to/s9y');
include 'serendipity_config.inc.php';
$entries = serendipity_fetchEntries();
foreach($entries AS $entry) {
echo $entry['title'] . "<br />";
echo substr($entry['body'], 0, 255);
echo "<hr />";
}
?>
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/