[wp-hackers] Prevent display of dynamic sidebar in widgets.php
andycharrington at gmail.com
Sun May 15 18:00:27 UTC 2011
Ah ok I see what you mean. However the plugin utilizes the drag and drop functionality of the sidebars and widgets. It capitalises On sidebars functioning as sidebars and widgets functioning as widgets.
Although the suggestion is a great one and would solve the initial dilemma, it would also take away functionality that really should stay...
Is there a way to use the_widget() instead of dynamic sidebars and still retain the functionality of the widgets? By this I mean that a user can drag and drop widgets to an area (it does not have to be an actual sidebar, as long as it still acts like one), customise widget option then save for a further function to render the output of the widget.
Of course, the functionality could be built from scratch, but it seems so silly when it already exists in WordPress. That's why I used it. It's just finding a way in to widgets.php that's the difficulty!
Sent from my iPhone
On 15 May 2011, at 18:41, Chip Bennett <chip at chipbennett.net> wrote:
> I think Nacin means: don't register/call a dynamic sidebar; instead, just
> output calls to the_widget() in whatever location in the template in which
> you would have otherwise called dynamic_sidebar().
> Here's an example of using
> On Sun, May 15, 2011 at 11:55 AM, Andy Charrington-Wilden <
> andycharrington at gmail.com> wrote:
>> Hi Nacin
>> Thanks for the response. I'm not sure what you mean though. Could you
>> please elaborate a little?
>> I am successfully emulating the widgets page functionality in my plugin to
>> allow assigning of widgets to sidebars.
>> I'm not sure how using the widget call would work?
>> Sent from my iPhone
>> On 15 May 2011, at 17:25, Andrew Nacin <wp at andrewnacin.com> wrote:
>>> On May 14, 2011 4:24 PM, "Andy Charrington-Wilden" <
>>> andycharrington at gmail.com> wrote:
>>>> Hi all
>>>> I am trying to find a way to exclude a dynamic sidebar from the default
>>> widgets page (widgets.php) in wp-admin. I know it sounds crazy but I am
>>> using dynamic sidebars as part of a plugin and as such don't want the
>>> to be able to assign widgets to the sidebars my plugin creates.
>>>> Does that makes sense? I hope so!
>>>> I haven't found any hooks I can use, so am wondering if the only option
>>> to use CSS to hide the sidebar in widgets.php. Not the ideal solution to
>>> honest so was hoping someone here had some bright ideas!
>>> Instead of leveraging dynamic_side ar() maybe your plugin should just
>>> the_widget(). There isn't an API for assigning widgets to sidebars
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers