Updates, Tips & Tricks

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

Add Twitter Bootstrap Icons to Widget Titles in WordPress

03 July

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', 'sozot_iconthlist');
function sozot_iconthlist() {
return '<i class="icon-th-list"></i>';
}
No comments yet.

Leave a Reply