简体   繁体   English

从另一个Wordpress博客获取Wordpress侧边栏?

[英]Get Wordpress sidebar from another Wordpress blog?

I want to write a plugin that will pull a sidebar from one Wordpress blog and place it in the sidebar of another blog. 我想编写一个插件,该插件将从一个Wordpress博客中提取侧边栏并将其放置在另一个博客的侧边栏中。 I know to write a plugin, but actually don't know where to start with this idea. 我知道写一个插件,但实际上不知道从哪里开始。

I believe he's saying that he wants to write a plugin to be able to retrieve a sidebar from another website and display it (possibly as a widget?). 我相信他是说他想编写一个插件,以便能够从另一个网站检索边栏并显示它(可能是一个小部件?)。 If that is not the question then I apologize; 如果这不是问题,我深表歉意。 otherwise, I'll take a shot at answering. 否则,我会回答。

The first thing I would recommend would be to view the code of just about any other widget plugin to make sure that a plugin (and not just some JavaScript) is really what you want. 我建议的第一件事是查看几乎所有其他小部件插件的代码,以确保插件(而不只是某些JavaScript)确实是您想要的。

Assuming you want the plugin, check out this resource for some basics . 假设您需要插件, 请查看此资源的一些基础知识 Also, you'll need the retrieval code which will either be "screen-scraping" in PHP or AJAX partial page loading with JavaScript . 另外,您将需要在PHP使用JavaScript的AJAX部分页面加载中进行“抓屏”的检索代码。

I hope any or all of this helps you get where you're going. 我希望所有这些都能帮助您到达目的地。

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

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