2 Methods to show wordpress lastest posts at other site

Method one, we can show other wordpress posts at our site by using  simplepie.inc, download a wordpress plugin, named “simplepie-core”, and upload simplepie.inc to your site root, you can rename simplepie.inc to other name also, ie, eyeglassframes.inc.

Then add the following code at your own site .php file.

<div style=”float:right;margin:20px;background-color: #fff;”>
<?php
require_once(‘eyeglassframes.inc’);
$feed = new SimplePie();
$feed->set_feed_url(‘http://www.glassespeople.com/eyeglassframes/feed/’);
//$feed->enable_cache(5);  Refresh caching in SimplePie
$feed->enable_cache(false);  // Disable caching in SimplePie
$feed->init();
//echo ‘<ul>’;
$i = 1;foreach($feed->get_items() as $item){
if($i<5){
echo ‘<h2 class=”entry-title”><a href=”‘.$item->get_permalink().'” mce_href=”‘.$item->get_permalink().'”>’.$item->get_title().'</a></h2>’. “\n”;
echo substr($item->get_description(),0,280).’…’.”\n”;
$i++; }}
//echo ‘</ul>’;
?> 
</div>

Another one is as follows, just copy and paste the following code at your site’s .php file.
<div style=”float:right;margin:20px;background-color: #ccc;”>
<?php
// Include WordPress
define(‘WP_USE_THEMES’, false);
require(‘eyeglasses/wp-load.php’);
query_posts(‘showposts=10’);
?>

<?php while (have_posts()): the_post(); ?>
<h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php endwhile; ?>
</div>