Styling widget titles with sprite image
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Hy,
can anyone refer me to post where is explanation on modifying widget titles with sprite image.
Something like this: http://joshlobe.com ๐
I guess it’s sprite image, correct me if I’m wrong …
Sample custom CSS code –
#widget-id .widget-title-icon {
background: url("icon URL") no-repeat ;
}
or give this plugin a try. DP Widgets Plus – http://wordpress.org/extend/plugins/dp-widgets-plus/
You also need to add this to your child theme functions.php file:
/**
* Modify the widget title to include an image placeholder
*/
function graphene_modify_widget_title( $sidebar ){
global $wp_registered_sidebars;
// If this is not the widget area we want to change, don't do anything
// if ( $sidebar['id'] != 'sidebar-widget-area' )
// return;
// Modify the title parameter
$sidebar['before_title'] = $sidebar['before_title'] . '<span class="widget-title-icon"></span>';
// Pass in the modified parameters to the registered sidebar array
$wp_registered_sidebars[$sidebar['id']] = $sidebar;
}
add_action( 'register_sidebar', 'graphene_modify_widget_title' );
lol.. I’m not so smart, just extracted the code behind widget h3 icon.. ๐
Thanx Josh,
that’s what’s bugging me…
I’ll try that plugin also, thnx Prasanna
Viewing 5 posts - 1 through 5 (of 5 total)
This free Support Forum relies on contributions from our support staffs and fellow Graphene themes users. While we endeavour to provide adequate and timely support, due to its voluntary nature responses are not guaranteed and may be delayed.
If you require urgent assistance, you may like to consider our Priority Support option.
Made with by Graphene Themes.