replace sidebar-title with image

  • Author
    Posts
  • #1087163

    Hello! I’m using the archive and category-widget, where I have to choose a title for the widget. Is there a way to replace the “categories”-title with an image? I can’t seem to figure it out. I am using this theme: http://theme.wordpress.com/themes/publish/

    Thank you,
    http://pausemusikk.wordpress.com/

    The blog I need help with is pausemusikk.wordpress.com.

    #1087488

    Sure. To do that, you’ll want to target specific widgets. So the first thing you should do is view the page source and find the ID value for the widget you’d like to update. Currently, your blog uses IDs of “categories-2” and “archives-4” for the categories and archives widgets respectively. Then you can use this CSS as a starting point to replace the widget titles with images:

    #categories-2 .widget-title {
    	text-align: left;
    	text-indent: -9999px;
    	width: 36px;
    	height: 36px;
    	background: url('http://s.wordpress.org/about/images/logos/wordpress-logo-32-blue.png') no-repeat;
    }
    
    #archives-4 .widget-title {
    	text-align: left;
    	text-indent: -9999px;
    	width: 36px;
    	height: 36px;
    	background: url('http://s.wordpress.org/about/images/logos/wordpress-logo-32-blue.png') no-repeat;
    }

    I used a logo image in this example, and you can replace the url() values and update the width and height settings to switch to a different image.

The topic ‘replace sidebar-title with image’ is closed to new replies.