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

Duplicate and change a Theme Widget

Widgets extend the Widget Class, search in the theme code for a class that extends WP_Widget. Copy/Paste it, rename it, and change what you’d like. You can also look in the file wp-includes/default-widgets.php and use one of those as a starting point.

How to place random widgets in the WordPress sidebar?

Here comes the workaround solution discussed in the comments: functions.php: add_action( ‘widgets_init’, ‘talfluxive_register_sidebars’ ); function talfluxive_register_sidebars() { // register five random widget areas register_sidebars( 5, array( ‘name’ => ‘Random Widget Area %d’ ) ); // register two fixed widget areas register_sidebars( 2, array( ‘name’ => ‘Fixed Widget Area %d’ ) ); } sidebar.php dynamic_sidebar( ‘Fixed … 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

remove from text-widget

OK, attempting to remove the with jQuery is counter intuitive. Modifying it via output buffering is inefficient. And we shouldn’t edit the actual widget code itself, since this will revert back next time we update WordPress. I would suggest either creating your own text widget, or simply extend and modify the existing WordPress widget as … Read more