简体   繁体   English

如何将现有的Wordpress博客集成到Magento

[英]How to integrate existing Wordpress blog into Magento

Our company has an existing Wordpress blog which I would like to integrate into our new Magento site. 我们公司有一个现有的Wordpress博客,我想将其集成到我们的新Magento网站中。

I need to show the latest 5 posts on my page. 我需要在页面上显示最新的5条帖子。 It can either be done via an RSS feed or some other method, but I would prefer to not install Wordpress on the same server so as to lag down my site's server. 可以通过RSS feed或其他方法来完成它,但是我宁愿不要在同一台服务器上安装Wordpress,以免影响我站点的服务器。

Any ideas or thoughts would be greatly appreciated. 任何想法或想法将不胜感激。

Do you already have a place to put it? 您已经有放置它的地方了吗? If you already understand how to theme Magento, you can do this in your template code: 如果您已经了解如何主题化Magento,则可以在模板代码中执行以下操作:

<?php $feed= new Zend_Feed_Rss('http://www.example.com/feed'); ?>

and then foreach loop through $feed grabbing ->link() or ->title() or whatever else you need. 然后foreach通过$feed抓取->link()->title()或您需要的任何其他内容循环。

Let me know if you need more help than this. 让我知道您是否需要更多的帮助。

查看此插件是否可以正常使用http://fishpig.co.uk/wordpress-integration.html

There are two very good answers on here already. 这里已经有两个非常好的答案。 The DiY RSS feed with the Zend library is brilliant (exactly what I wanted myself, rolling my own, right now...). 带有Zend库的DiY RSS提要非常出色(正是我想要的,现在自己滚动,...)。 The use-the-Fishpig-integration answer is very sound advice (that module is fantastic). 使用“ Fishpig”集成答案是非常合理的建议(该模块很棒)。

However Meghan may want something out the box, installable in five minutes rather than lots of time lost fettling. 但是Meghan可能需要开箱即用的东西,可以在五分钟内安装好,而不会浪费很多时间。 The module by EM themes does the job, looks the part and has options in admin so the feed can be shown neatly regardless of source. EM主题的模块可以完成工作,查找零件并在admin中提供选项,因此无论来源如何,都可以整洁地显示feed。

http://www.magentocommerce.com/magento-connect/em-rss-atom-news-feed-widget.html http://www.magentocommerce.com/magento-connect/em-rss-atom-news-feed-widget.html

Feedburner is the way I chose to go - it was simple and easy to integrate: Feedburner是我选择的方式-集成起来非常简单:

<script src="http://feeds.feedburner.com/johnsoncreeksmokejuice/xZjR?format=sigpro&nItems=5&    dateLocation=above"
 type="text/javascript" ></script>
<noscript><p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com    /johnsoncreeksmokejuice/xZjR"></a></noscript>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM