Page 1 of 1
simplest way to show weblog posts
Posted: Mon Aug 29, 2005 7:13 pm
by Guest
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
Posted: Tue Aug 30, 2005 6:32 am
by wesley
If you want to keep the blog page intact while your website's main page is
separate and standalone, the RSS feed sounds like a good idea...
Posted: Tue Aug 30, 2005 5:50 pm
by Guest
can you recommend any good php scripts to do this?
Posted: Wed Aug 31, 2005 1:29 pm
by garvinhicking
You could also use the s9y API to show your entries:
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 />";
}
?>
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