I’m having magento ecommerce website & wordpress blog site. I want to display recent 5 blog posts in my magento homepage. I tried with below codes
// Get the last 3 posts.
<?php
require('/the/path/to/your/wp-blog-header.php');
?>
<?php query_posts('showposts=3'); ?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
<?php endwhile;?>
I copied this file in new .phtml file and i called that file to homepage. But after doing this my homepage is showing only header & breedcrumbs…
Any solution for this problem is appreciated……
Don’t integrate on the php side, use the rss feed with a feed reader such as http://www.magentocommerce.com/magento-connect/flagbit-feed-reader.html