如何将 WordPress 博客嵌入到另一个站点?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1125886/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I embed a WordPress blog into another site?
提问by samoz
I currently make my website using iWeb. Is there a way that I can embed a WordPress blog into the site? Either through an easy option or through coding?
我目前使用 iWeb 制作我的网站。有什么方法可以将 WordPress 博客嵌入到网站中?是通过简单的选择还是通过编码?
回答by AlbertoPL
It can be done, but not through iWeb. You will need to do it through code (in Wordpress' case, PHP).
它可以完成,但不能通过 iWeb。您需要通过代码来完成(在 Wordpress 的情况下,PHP)。
Here's a guide for integrating Wordpress with your site, I'm afraid laying out the steps would be far too long an answer for SO.
这是将 Wordpress 与您的网站集成的指南,恐怕列出这些步骤对于 SO 来说太长了。
http://codex.wordpress.org/Integrating_Wordpress_with_Your_Website
http://codex.wordpress.org/Integrating_Wordpress_with_Your_Website
回答by Taswiz
I would agree that an iFrame is the easiest way...
我同意 iFrame 是最简单的方法......
However there are some real problems with this method. Wordpress has it's own automatic navigation which visitors will use, taking them to places that may be different than your normal navigation would. Categories and other that cannot be switched off. You can remove these through some tweeking of the css but then you might as well do the php thing.
然而,这种方法存在一些实际问题。Wordpress 有它自己的自动导航,访问者将使用它,将他们带到可能与您的正常导航不同的地方。无法关闭的类别和其他。您可以通过 css 的一些 tweeking 删除这些,但您也可以做 php 的事情。
回答by Charles
I'm on a PC and using NetObjects instead of iWeb, but I used iframes to do mine and think the technique could work for iWeb. Basically it involved adding the iframe HTML, some javascript to adjust the iframe hieght, and some tweaks to the WordPress theme to get rid of the header.
我在 PC 上使用 NetObjects 而不是 iWeb,但我使用 iframes 来做我的并且认为该技术可以用于 iWeb。基本上它涉及添加 iframe HTML,一些 javascript 来调整 iframe hieght,以及对 WordPress 主题的一些调整以摆脱标题。
I put together a tutorial video on how I did it here: http://www.youtube.com/watch?v=7GuocgQlCmwThe description on youtube includes links to where I got the information on how to do it and my blog entry describing the process.
我在这里整理了一个关于我如何做到的教程视频:http: //www.youtube.com/watch?v=7GuocgQlCmw youtube 上的描述包括指向我获得如何操作的信息的链接以及我的博客条目描述过程。
回答by Gaia
The simplest way is to make an iframe in iweb and insert your wordpress blog in the iframe. Many people do it this way.
最简单的方法是在 iweb 中制作一个 iframe,然后在 iframe 中插入你的 wordpress 博客。很多人都是这样做的。