您现在的位置是:首页 > cms教程 > WordPress教程WordPress教程

利用fishpig_wordpress_integration插件整合WordPress到Magento

宛儿2025-03-24WordPress教程已有人查阅

导读magento目录下新建子目录blog,上传wordpress文件到该目录,新建数据库magento_blog,也可以省略这一步,直接装在原数据库上,用前缀区分表.运行http://yourmagento.com/blog安

magento目录下新建子目录blog,上传wordpress文件到该目录,新建数据库magento_blog,也可以省略这一步,直接装在原数据库上,用前缀区分表.
运行http://yourmagento.com/blog安装wordpress.
安装fishpig_wordpress_integration插件,地址为http:// .magentocommerce.com/magento-
connect/fishpig/extension/3958/fishpig_wordpress_integration
后台进入/WordPress/Setting/Database Integration配置相关信息
Database
设置wordpress数据库位置,是与magento同一数据库还是单独数据库.
Integration
设置整合方式
Semi-Integration
Semi-Integration在magento应用程序中提供有 的wordpress信息,且不自动显示.适合只想在magento中显示少量wordpress信息,让maegnto
跟wordpress保持各自的模板主题.
Full-Integration
Full-Integration允许wordpress的所以前台显示由magento负责,换言之wordpress使用magento的模板主题包.适合不想为wordpress单独制作模
板的用户.
如果选择Full-Integration,需要设置Blog Route,假设设置为wp,需要进入wordpress后台Settings->General设置Site address为
http://yourmagento1/index.php/wp
显示最新文章
<reference name="left">
<block type="wordpress/post_list_recent" name="wp.recent-posts" template="wordpress/post/recent.phtml">
<action method="setTitle"><title>Recent Posts</title></action>
<action method="setPostCount"><post_count>3</post_count></action>
</block>
</reference>
{{block type="wordpress/post_list_recent" template="wordpress/post/recent.phtml" title="Recent Posts" post_count="3"}}
显示指定目录
<reference name="left">
<block type="wordpress/post_list_recent" name="wp.recent-posts" template="wordpress/post/recent.phtml">
<action method="setTitle"><title>Recent Posts</title></action>
<action method="setPostCount"><post_count>3</post_count></action>
<action method="setCategoryId"><category_id>1</category_id></action>
</block>
</reference>
{{block type="wordpress/post_list_recent" template="wordpress/post/recent.phtml" title="Recent Posts" post_count="3"
category_id="1"}}
显示指定作者
<reference name="left">
<block type="wordpress/post_list_recent" name="wp.recent-posts" template="wordpress/post/recent.phtml">
<action method="setTitle"><title>Recent Posts</title></action>
<action method="setPostCount"><post_count>3</post_count></action>
<action method="setAuthorId"><author_id>1</author_id></action>
</block>
</reference>
{{block type="wordpress/post_list_recent" template="wordpress/post/recent.phtml" title="Recent Posts" post_count="3"
author_id="1"}}

本文标签:

很赞哦! ()

相关源码

  • 自适应LED照明外贸灯具灯泡灯具英文网站模板该外贸灯具网站模板专为LED照明、灯具出口企业定制,采用PbootCMS内核开发,提供高效建站方案。通过响应式设计和SEO优化能力,帮助企业低成本构建专业外贸展示平台。查看源码
  • (PC+WAP)红色厨具厨房用品设备pbootcms模板源码下载为厨具设备企业设计的响应式网站模板,采用PbootCMS内核开发,适用于商用厨房设备、家用厨具、厨房用品等企业展示。模板包含产品展示、新闻动态、案例中心等标准模块,助您快速搭建专业级行业网站。查看源码
  • (PC+WAP)地暖热水器烘干机节能设备网站模板下载为地暖热水器及节能设备企业设计的PbootCMS网站模板,集成产品展示、节能方案介绍、技术参数说明等专业模块。采用PC与移动端同步响应架构查看源码
  • 帝国cms题库问答学习平台模板知识付费网站源码+数据采集为教育机构、培训平台及在线学习场景设计,提供完整的题库管理与问答服务解决方案。支持多种题型展示与答案查询,满足不同层次的学习需求。查看源码
  • (自适应)大型农业机械设备水稻玉米收割机网站pbootcms源码下载本模板基于PbootCMS内核开发,为农业机械设备制造与销售企业设计,特别适合水稻玉米收割机、拖拉机、播种机等农用机械展示。模板充分考虑了农机行业的特性,从产品展示到技术参数,从作业案例到售后服务查看源码
  • (自适应)帝国cms7.5文章新闻博客整站源码( 带会员中心)本模板基于帝国CMS内核开发,为新闻资讯、个人博客及作品展示类网站设计。采用响应式布局技术,确保在手机、平板和电脑等不同设备上都能获得良好的浏览体验。查看源码
分享笔记 (共有 篇笔记)
验证码: