Last active
January 11, 2016 11:19
-
-
Save rickrduncan/6087969 to your computer and use it in GitHub Desktop.
Method 2: Customize WordPress widget title.Full tutorial: http://www.rvamedia.com/wordpress/customize-wordpress-widget-title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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