Widget Options Not saving

Your problem is that you’re calling the wrong method for generating the name attribute. It should be $this->get_field_name(‘via_cat’) Also, you can use wp_dropdown_categories(), no need to reinvent the wheel: wp_dropdown_categories(array( ‘name’ => $this->get_field_name(‘via_cat’), ‘selected’ => (int)$instance[‘via_cat’], ));

Add filter to blogroll widget

Filter the arguments for the blogroll: add_filter( ‘widget_links_args’, ‘wpse_76521_filter_blogroll’ ); function wpse_76521_filter_blogroll( $args ) { $li_start = isset ( $args[‘before’] ) ? $args[‘before’] : ‘<li>’; $args[‘before’] = $li_start . ‘<i class=”icon-ok”></i>’; return $args; } Explanation The blogroll is created by the widget class WP_Widget_Links. This class calls wp_list_bookmarks() with some prepared widget arguments which we … Read more

Highlight custom widgets in the admin area?

All widgets in the admin area get an id in the style widget-[global_counter]_[widget_key]-[widget_id], like widget-59_monkeyman_widget_shortcut-5 (installed widget) or widget-11_monkeyman_widget_shortcut-__i__ (an uninstalled widget in the list). If your widget key contains something unique for all your widgets (like your company name), you can use this and add a substring attribute CSS selector (which works in most … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)