• Jun
  • 07
  • 2012
blog-image

Currently since from few weeks, I am working on Expression Engine. Now you thought that what is Expression Engine.

Now let me explain you in little brief. Expression Engine is one of the great CMS software like WordPress, Joomla, Drupal etc.

So when I was working with this, I faced one requirement like show latest posts of WordPress blog into Expression Engine site.

This kind of requirement arises because WordPress is mainly made for the blogging purpose. So people prefer to use WordPress for it blog and other cms like Joomla, Zencart, Expression Engine, Magento etc for rest of the site depending on its site’s requirement.

I found the solution and this technique works in any other CMS like Joomla, Drupal etc. I explain here how it works.

Show Your WordPress posts to Other CMS

We have to use SimplePie for this technique. Now, what is SimplePie ? SimplePie is an RSS feed parsing in PHP. Just copy and paste below code:

<?php $feed = new SimplePie(‘http://wordpress.org/news/feed/’); ?>
<?php foreach ($feed->get_items(0, 3) as $item): ?>
<div>
<a href=”<?php print $item->get_permalink(); ?>”> <?php print $item->get_title(); ?></a>
<p><?php echo shorten($item->get_description(), 100);?> </p>
</div>
<?php endforeach; ?>

<?php $feed = new SimplePie(‘http://wordpress.org/news/feed/’); ?>
<?php foreach ($feed->get_items(0, 3) as $item): ?>
<div>
<a href=”<?php print $item->get_permalink(); ?>”> <?php print $item->get_title(); ?></a>
<p><?php echo shorten($item->get_description(), 100);?> </p>
</div>
<?php endforeach; ?>

That’s it !! If you think that this post is useful for you or if you have any issue or any problem then just comment me on this post.

Want any help in WordPress Web Development? Inquire Us!

 Hire WordPress Developer

Ravi Makhija

Ravi Makhija

A writer, an Entrepreneur. Curious about the internet of everything. Interested in the cutting edge landscape of mobile apps and SAAS products. Blogs for Guru Technolabs - A Mobile App Development Company.

Popular Blogs

recent-blog-image

Among the many digital tools that are being used with…

recent-blog-image

This question is most searched question in google. It is…

recent-blog-image

When you are using WPML in wordpress at that time…

recent-blog-image

Method for linking pages that aren't in a Site Menu…

recent-blog-image

Manier times we come across requirement like fetching/getting content from…

Let's Discuss a Project

Please share your unique idea or project requirement with us, our business concern person will get back to you with further details.