从页面编辑屏幕管理小部件
我正在寻找一种将小部件控制区域集成到页面编辑屏幕中的方法。对于我正在制作的网站来说,具有相同的拖放功能将是完美的。
我想要一个可用小部件的列表,我可以将其拖放到页面小部件区域中。然后,小部件将仅显示在该特定页面上。
我查看了 wp-admin/widgets.php 文件并尝试使用其中的一些代码。我什至尝试在 post.php 的末尾包含 widgets.php (这基本上是我想要的,但当然给了我有趣的结果)。 请不要推荐像 Widget Context 或 Widget Logic 这样的插件。如果我不能做到这一点,这些就是我的后备措施:)
所以我想要关于如何实现这一目标的想法和/或意见。最好我想在functions.php 文件或插件中执行此操作。
编辑:我对此仍然感兴趣。只要有一个关于如何做到这一点的理论描述就很棒了:)
I'm looking to find a way to integrate the widget control area into the page edit screen. For the site I'm making it would be perfect with the same drag and drop functionality.
I want a list of the available widgets that I can drag and drop into the page widget area. The widgets will then only be shown on that particular page.
I've looked through the wp-admin/widgets.php file and tried to use some code from there. I even tried just including widgets.php at the end of the post.php (which is basically what I want, but of course gave me funny results).
Please don't suggest plug-ins like Widget Context or Widget Logic. Those are my fallback if I cant do this :)
So I would like ideas and/or input on how to accomplish this. Preferably I'd like to do it in the functions.php file, or in a plug-in.
Edit: I'm still interested in this. Just a theoretical description on how to do this would be awesome :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
让我提前道歉,我没有给你答案,但我确实有一个插件建议,可能比小部件上下文或小部件逻辑更好(这个可以让您从“帖子编辑”添加小部件内容)屏幕):
http://wordpress.org/extend/plugins/my-snippets/
Let me apologize in advance, I don't have an answer for you but I do have a plugin suggestion that may be a better fall back than Widget Context or Widget Logic (this one lets you add the widget content from the "post edit" screen):
http://wordpress.org/extend/plugins/my-snippets/
这是一个非常古老的问题,但我认为你没有得到正确的答案。我认为以下插件(非免费)更适合您的需要。使用此插件,您可以从页面编辑屏幕管理小部件。玩得开心!
终极小部件管理器
Its a really old question but I don't think that you've got the right answer. I think the following plugin (not free) is closer for what you need. With this plugin you can manage the widgets from the page edit screen. Have fun!
Ultimate Widget Manager