Problem with widgets

Most themes will have a default set of widgets that appear when you don’t add any widgets yourself (using the widget page in admin). You can normally just drag the widgets that were “hard-coded” into the correct sidebar, and all should be ok.

Can WordPress Read Its Own RSS Feed?

Better to use a query loop to show posts, which is a modifed version of the main WP loop. This query loop won’t interfere with the main WP loop and can be used mutiple times in a sidebar or post/page with php execution enabled. Use a php widget in your sidebar: WordPress › PHP Code … Read more

How to get “Widget Logic” plugin’s input value in a custom widget code (to display on the Widget admin page)

I’m almost sure there is no way to do that (server side) without hacking core files, bu luckly i know a little jQuery and i’ve come up with this hackish function that does the job just fine: function widget_logic_hack(){ global $pagenow; if ($pagenow == ‘widgets.php’){ ?> <script> function hack_logic(){ jQuery(‘input[id$=”widget_logic”]’).each(function() { if (jQuery(this).val().length === 0){}else{ … Read more

How to truncate titles in Recent Posts widget?

I wasn’t sure if i would answer or simply vote to close this topic, i feel i sufficiently asnwered the original topic you’re referring to, i’d only be repeating myself here. That said, here’s an upto date version you can use(only took me 2 mins), you only need implement your own code to truncate the … Read more

Excluding specific widgets from default sidebar class

I coded my own answer together using a filter and dynamic_sidebar_params: <?php add_filter(‘dynamic_sidebar_params’,’io_blogroll_class’); function io_blogroll_class($params){ $params[0][‘before_widget’] = ‘<li class=”‘.$params[0][‘widget_name’].’ box”>’; $params[0][‘after_widget’] = ‘</li><!–‘.$params[0][‘widget_name’].’–>’; if ($params[0][‘widget_name’] == “Links”){ $params[0][‘before_widget’] = ‘<li class=”‘.$params[0][‘widget_name’].'”>’; $params[0][‘after_widget’] = ‘</li><!–‘.$params[0][‘widget_name’].’–>’; } return $params; } ?> The first lines actually override whatever you programmed register_sidebar() or register_sidebars()to put before and after a … Read more

Toggle option in sidebar widgets

The after_title does not go through any transformations. In fact only the before_widget does: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/widgets.php#L876 However, a little lower you can see that $params = apply_filters( ‘dynamic_sidebar_params’, $params ); there’s a filter you can hook to do your own filtering. add_filter( ‘dynamic_sidebar_params’, ‘wpse_45418_change_after_title’ ); function wpse_45418_change_after_title( $params ) { $id = $params[0][‘widget_id’]; if ( $id … Read more