­
­
How can I display wordpress post into another CMS – RM Web Lab
 

How can I display wordpress post into another CMS

How can I display wordpress post to another site , that is not in wordpress platform?

It is easy to display any part of wordpress content in another platfor site.

For example i have do the following to display recent post into magento CMS.

Just I create a file name showPost in wordpress index folder. and write the following code in it

<style type="text/css">
.homeShowPost{ padding:0px; margin:0px;}
.homeShowPost li{ padding:2px 0 2px 5px; list-style-type:none;}
.homeShowPost li a{ font-family:Arial, Helvetica, sans-serif; font-size:13px; text-decoration:none; color:#FFF;}
.homeShowPost li a:hover{ text-decoration:underline;}
.blogInFrame{}
</style>
<?php
define('WP_USE_THEMES', false);
require('wp-load.php');
?>
<ul>
<?php
global $post;
$myposts = get_posts('numberposts=5');
foreach($myposts as $post) :
setup_postdata($post); ?>
<li><a href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>

and this file require form magento site, nothing else.

Finally I get the recent five post from magento.

Leave a Reply

Your email address will not be published. Required fields are marked *