Hi,
i would simply read out your rss feed. Maybe the WordPress database structure will change in the future so query the posts directly is not very safe.
Just download the Magpie RSS Parser and include the following script on your page:
<?php
require_once('magpierss/rss_fetch.inc');
$url="http://www.yourblog.com/feed/";
$num_items = 5;
$rss = fetch_rss($url);
$items = array_slice($rss->items, 0, $num_items);
foreach ( $rss->items as $item ) {
echo "Title: " . $item['title'];
echo "Published: " . date("h:i:s A", $published);
echo "";
}
?>
More info about Magpie can be found here.
Well, if the page is plain HTML, no. Not without a server-side include, or javascript. There are a few JS systems that will display feeds.
If it is a PHP page, you could use my CG-FeedRead plugin, which was built for uses just like this.
-d
hi arnee,
thanx for your advise – I´ve installed magpie and checked everything so far. it runs but it doesnt work yet.
I always get the error-message:
“items, 0, $num_items); foreach ( $rss->items as $item ) { echo “Title: ” . $item[‘title’]; echo “Published: ” . date(“h:i:s A”, $published); echo “”; } ?>”
do you have an idea what´s wrong with it – the feed-address is ok …?
Hi,
you need to place the code in a PHP file. If you hoster supports php, simply rename your .html file to .php and it should work.