Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Method 2: Customize WordPress widget title.Full tutorial: http://www.rvamedia.com/wordpress/customize-wordpress-widget-title
<?php
//* Do NOT include this comment or the opening php tag above
//* Insert SPAN tag into widgettitle
add_filter( 'dynamic_sidebar_params', 'b3m_wrap_widget_titles', 20 );
function b3m_wrap_widget_titles( array $params ) {
// $params will ordinarily be an array of 2 elements, we're only interested in the first element
$widget =& $params[0];
$widget['before_title'] = '<h4 class="widgettitle"><span class="sidebar-title">';
$widget['after_title'] = '</span></h4>';
return $params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment