How Can I Duplicate a Widget?

I had the same Problem with one of my Clients, and found this GREAT soluiton: Duplicate Widget. It comes as a new Widget, but has just one option: choose which Widget it should duplicate, and you also see from where it is duplicated (for easy overview where to change the values of the original Widget). … Read more

Is It Possible to Restore Accidentally Deleted Widgets?

You have to search the wp_options database table for option_name‘s that contains widget. That search results in: Using the values of your backups, you’ll then proceed to restore the option_value of the missing widgets. And also the value of the option of sidebars_widgets. Goes without saying that backing up before doing this modifications is essential.

Ban certain widgets from certain sidebars

You are overthinking it. The concept of widgets is designed to be transferable between widget area (AKA sidebars). If a widget is not tranferable it is just not a true wordpress widget. Now creating your own framework of widgets sound like a non pleasant idea. In addition to fighting the wordpress core code, you will … Read more

Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?

You are adding filter, not an action. I don’t know how Genesis hook works, but native wp_nav_menu_items passes (and expects back) markup of custom menu items. Instead of echoing your additional stuff you should append it to input and return. This is clearly how it’s done in tutorial you linked to: add_filter(‘wp_nav_menu_items’,’follow_icons’,10,1); function follow_icons($output) { … Read more

Problems with the sidebar args and wp_list_bookmarks

After a few var_dumps I know this: 1) When wp_list_bookmarks is called whithin WP_Widget_Links->widget The ‘class’ parameter is ignored because the ‘category_before’ parameter doesn’t have the %class wildcard. Instead ‘category_before’ will look as if ‘class’ where ‘widget_links’. This is how the function dynamic_sidebar set the $before_widget parameters for the widget once it gets called. Of … Read more

Add a select box to all widgets

Thanks to Ed Nailor & Kucrut ! http://ednailor.com/2011/01/24/adding-custom-css-classes-to-sidebar-widgets/ // __________________________________________________________ // // CUSTOM CLASS BY WIDGETS function kc_widget_form_extend( $instance, $widget ) { if ( !isset($instance[‘classes’]) ) $instance[‘classes’] = null; /* Set your predetermied class choices here */ $myarray = “class1,class2,class3”; $myclasses = explode(“,”,$myarray); $row = “\n”; $row .= “\tid_base}-{$widget->number}-classes’>Class:\n”; $row .= “\tid_base}[{$widget->number}][classes]’ id=’widget-{$widget->id_base}-{$widget->number}-classes’ class=”widefat”>\n”; foreach($myclasses … Read more

What is the use case for the “Class” parameter in register_sidebar?

If you fill class parameter to register_sidebar function then the class sidebar-{class name} gets added to the div of that sidebar in the back end. For example if you register the sidebar using following code : register_sidebar( array( ‘name’ => __(‘Footer Widget One’, ‘wpbs-framework’), ‘id’ => ‘footer-01’, ‘class’ => ‘testing’, ‘description’ => __(‘The first footer … Read more

Unregistering a Sidebar in Child Theme

It should be possible to use the after_setup_theme hook to unregister the sidebar you don’t want like this: function go_away_extra_sidebar(){ unregister_sidebar( ‘Footer’ ); } add_action( ‘after_setup_theme’, ‘go_away_extra_sidebar’ ); Happy Coding, Kuchenundkakao

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