mailto: as header

  • Anonymous



    I’d like to know how I can set my header pic to be a

    We use our header-image as an advertise to find a singer (isn’t that the best place??) and I want interested people to be able to just click the header-image to mail us. I haven’t disabled the options to be directed to homepage when header is clicked but disabled the text option. Added some text in photoshop to the header-image, but can’t seem to figure out how to add the mailto:etc thingy…




    Kenneth John Odle


    By default, the header image will link back to the home page. If you really wanted to do this, your best bet would be to add mail buttons to the top bar. The correct format would be:

    <a href=""><img src="http://pathtoimage" /></a>

    and then stand back. Links like this are notorious spam magnets.



    thought it would be spam magnet, that’s why we use an alias ( we will only use as long as our search for a singer takes… Besides, I always loved to be a magnet of some kind, lol…

    where do i put the code in? Should I set up a header.php in my child theme? The image I use is chosen through admin -> options -> header (not sure if path is correct, but you know what I mean, right?)

    OR (using your example) I have to choose NO image at the admin options and put the <a href=""><img src="http://pathto.HEADER.image" /></a> in the header.php ??? ( but where… hmmm)

    MAYBE I should rewrite the text in the header image in photoshop and put the email-adress there for all to see… that will reduce the spam-amount, but makes it a bit harder for people to mail.

    I think I’ll go with the last option and put some more AXE on (<= for being a magnet). I’m still curious about whereto put the coding in…

    Well thanks again!


    Kenneth John Odle


    I never recommending editing core theme files, but since you only want to do this temporarily:

    Open up header.php and find this line (84):

    <a href="<?php echo home_url(); ?>" id="header_img_link" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>"> </a>

    and replace it with:

    <a href=""><img src="http://pathtoimage" /></a>

    using the appropriate mail address and image path, of course.

    To undo this, just re-upload your header.php file (or wait for the next update).

    However, a better way might be to do this in a header widget, which you could then have as separate from your image and would be more noticeable. (You’d be surprised how many people ignore your header image.)

    See this thread for more info:

    I HIGHLY recommend the second option. You might get better results that way, too.

Viewing 4 posts - 1 through 4 (of 4 total)

  • You must be logged in to reply to this topic.