Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
* Author: Rocky Mehta
* Link:
* Email:
/* Enable html Span tag support in WordPress widget title*/
add_filter( 'widget_title', 'html_tag_support_widget_title_function' );
function html_tag_support_widget_title_function( $title ) {
$title = str_replace( '[span]', '<span>', $title );
$title = str_replace( '[/span]', '</span>', $title );
return $title;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment