Zencart调用WordPress最新文章

把WordPress安装到zen-cart一个子目录里吧,设置好固定连接等
这个文件/includes/templates/lite_grey/common/在合适的地方加入下面两行代码

<?php require(‘../wordpress所在目录/wp-blog-header.php’); ?> 这行调用WordPress自带函数,目录地址要随着WordPress安装目录变化而变化
<?php get_archives(‘postbypost’, 10); ?> 这里的10指调用的最新文章数量

此条目发表在 Zencart 分类目录。将固定链接加入收藏夹。

发表评论