0
我正在使用magento电子商务网站& wordpress博客网站。我想在我的magento主页上显示最近的5篇博文。我试着用下面的代码如何显示最近从wordpress网站到magento的5个帖子
// 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;?>
我把这个文件复制到新的.phtml文件中,我把那个文件叫做主页。但做完这个后,我的主页只显示标题& breedcrumbs ... 任何解决方案,这个问题是赞赏......
尝试创建简单的模板(只显示5篇文章),并做iframe .. – ruslyrossi