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

Blogroll – Different layout for first post

Creating 2 queries for your scope is absolutely an not need work… Use only one query and use the $wp_query->current_post property to change the output of first post.. $args = array ( ‘pagination’ => true, ‘paged’ => $paged, ‘posts_per_page’ => ’10’, ‘ignore_sticky_posts’ => true, ‘order’ => ‘DESC’, ‘orderby’ => ‘date’, ); // The Query $query … Read more

modifying a template and adding jQuery to it

Rather than modifying the template, since you’re going to need jQuery anyway, you can do this.. Add to the functions.php add_action( ‘wp_enqueue_scripts’, ‘blogroll_toggles’ ); function blogroll_toggles() { if( is_page_template( ‘bookmarks.php’ ) ) wp_enqueue_script( ‘blogroll-toggle’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/blogroll-toggle.js’, array( ‘jquery’ ) ); } Or create a new folder in the wp-content/plugins/ folder, create a … Read more