"hr-slider", "description" => "Add any type of Sliders as a widget.", ); $controlOps = array( "width" => '', "height" => '', "id_base" => "slider-widget" ); $this->WP_Widget("slider-widget", "HR Sliders", $widgetOps, $controlOps); } function widget($args, $instance){ extract($args); $title = apply_filters("widget_title", $instance["title"]); $count = $instance["count"]; echo $before_widget; //echo $before_title . $title . $after_title; ?> "Slider Widget", "count" => "3" ); $instance = wp_parse_args((array) $instance, $defaults); ?>

" class="widefat" name="get_field_name("title"); ?>" value="" style="width: 96%;" />

Make sure to specify exact number of sliders, otherwise the widget won't work.

" class="widefat" name="get_field_name("slider" . $i . "-link"); ?>" value="" style="width:96%;" />