• Hi everybody!!
    I’m trying to change the text titles of calendar and blogroll widgets with an image, but I don’t know how to do this…

    Also I want to put an image in each per category header.

    Any ideas?

    Any help would be appreciated!Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • if you are OK with writing PHP and using filters you could try my new plugin

    http://wordpress.org/extend/plugins/widget-logic/

    which can add a ‘widget_content’ filter. (i now feel like i’m spamming about my plugin!)

    Hi Alan,

    Great plug in by the way…I’m using it. Where would you put the img tag?
    It comes up as blank if I place it in the title area after I save the update.

    if you want to replace widget titles with an IMG, i’d put the IMG tag inside the H2 tag. The example code I give at the foot of

    http://wordpress.org/extend/plugins/widget-logic/other_notes/

    should give you some idea. It takes the widget content, finds the text between <h2> and the next < and replaces it with code to render an image and returns the result.

    check the source of your page to see if you’ve managed to sub in the right IMG tag code.

    When I was inputting images in the text areas of the widgets I HAD to specify either a width or a height in order for them to display. I tested this by putting an image in the “title” section of your widget and…it didn’t work. 🙁 I suppose changing the source code works as well, but it would be nice to be able to do it to the widget title box without having to muck with the source.

    BTW it didn’t work in a Daiko text box header either.

    i’m not really following you – sounds like a CSS issue?

    anyway!… it’s just occurred to me that you could replace the H2 text in a widget entirely with CSS. see this trick here:

    http://phark.typepad.com/phark/2003/08/accessible_imag.html

    eg the heading of the first text widget can be selected in CSS with “li#text-1 h2”. so something like

    li#text-1 h2
    { background: url(yourpictoreplacetextwidgetheading.gif) no-repeat;
    width: xx; height: yy; etc
    text-indent: -9000px;
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how can I replace text titles to images in widgets?’ is closed to new replies.