Updates, Tips & Tricks

Updates as Released, Plus My Personal Collection Of WordPress Best Practices

Add Twitter Bootstrap Icons to Widget Titles in WordPress

01 March

Best option I’ve found is via a shortcode. Open your functions.php in your favorite text editor and first enable shortcodes for widget titles:

add_filter('widget_title', 'do_shortcode');

Then, add your shortcode with the icon:

add_shortcode('iconthlist', 'wpbase_iconthlist');
function wpbase_iconthlist() {
return '<i class="icon-th-list"></i>';
}
No comments yet.

Leave a Reply