I'd like to be able to register multiple copies of the Quick Search Widget in the code below, so that I can have it multiple sidebars. The code has been taken from a plugin I've downloaded
function quickSearchwidgetform()
{
include(WP_DSP_ABSPATH . 'wp_search_wiget_form.php');
}
function widget_dspquicksearch($args) {
extract($args);
echo $before_widget;
echo $before_title;?>
Quick Search<?php echo $after_title;
quickSearchwidgetform();
echo $after_widget;
}
function dspquicksearch_init()
{
wp_register_sidebar_widget(
'dsp_quick_search_widget', // your unique widget id
'Quick Search Widget', // widget name
'widget_dspquicksearch', // callback function
array( // options
'description' => 'A Quick Search widget that displays dsp dating quick Search form.'
)
);
}
add_action("plugins_loaded", "dspquicksearch_init");
Now I've read in the codex that the new updated method of registering a widget, should be done by register_widget() - however, when I update the code below to use this, the widgets page in my admin screen goes completely white.
Admittedly I may be out of my depth here, but am keen to learn how to fix this. Any tips would be greatly appreciated.
Thank you