Heh, a lot of folks trying to figure this out.
You can use something like my CG-FeedRead script/plugin, and just show 1 post from the feed. Just grab the CG-PowerPack of scripts, and set it up on your website (copy the files up, make the cg-plugins/cache_feedread folder writeable…).
Then, you just do something like this on your main PHP page:
$path = dirname(__FILE__).'/';
$plugin = 'wp-15/wp-content/plugins/cg-plugins/cg-feedread.php';
if (file_exists($path.$plugin))
{
include($path.$plugin);
if (function_exists('getSomeFeed'))
{
$feedUrl = "https://www.chait.net/wp-rss2.php";
$feedOut = getSomeFeed($feedUrl, 1, 1, "feed-cdn");
if (!empty($feedOut)) echo $feedOut;
}
else
echo "CG-FeedRead script didn't initialize properly.";
}
else
echo "Couldn't access CG-FeedRead script.";
$refplugin should point to the sub-path all the way down to the cg-feedread.php script.
The ‘feed-cdn’ string can be any identifier for the feed’s cache file.
The first [1] is to pull just one item. If you want more than one, use a higher number.
The second [1] is a ‘styling’ thing. If in main body area, use 1, if sidebar probably use 0.
The system CACHES the content. So once cached, it won’t refresh, even if you change options, until the cache expires. You can try passing an empty string for the cache file identifier, or if you need to play with stuff I can show you how to set the cache-refresh to something ‘silly’, like 5 seconds.. ??
-d