[wp-hackers] Using the_widget() to get a specific instance of a multi-instance widget
scribu at gmail.com
Sun Aug 8 10:38:28 UTC 2010
On Sun, Aug 8, 2010 at 6:26 AM, Mikel <mikel at mahunneysfarm.com> wrote:
> Trying to use the_widget() to access a specific instance of a
> multi-instance widget and failing miserably.
> Have tried by title and fiddling with variations on array(number=> x) for
> the $instance parameter but
> multiple sidebars is the only way I can get this running successfully with
> the WP Text Widget.
That's because the_widget() doesn't search for a specific instance; instead,
it expects you to send it an instance yourself. It's basically a shortcut
for calling WP_Widget_Text::widget().
More information about the wp-hackers