• Resolved coffee_king

    (@coffee_king)


    Hi there
    I have my email address as a part of the image on my header image.
    Is there anyway I can make it so that when someone clicks on the email image in the header it opens the persons email client and automatically fills in my the email address where to send it?
    I believe this is called Mapping.

    I dont want it to do this all over the image header, just when you hover over the email address. The rest of the area I want to still revert to homepage when clicked.

    Thanks

    WordPress Theme TwentyEleven

Viewing 15 replies - 16 through 30 (of 40 total)
  • You now need to add a copy of the orginal header.php template file into your child theme

    Yes – into the theme’s folder. Not into the style.css file!

    Thread Starter coffee_king

    (@coffee_king)

    Apologies.
    Right, I’m kind of getting here now.

    So I should have
    a folder called
    twentyeleven-child
    sitting in my THEMES folder.

    In the
    twentyeleven-child folder
    I should have two files

    style.css
    with the following code

    /*
    Theme Name: Twenty Eleven Child
    Theme URI: http: //example.com/
    Description: Child theme for the Twenty Eleven theme
    Author: Your name here
    Author URI: http: //example.com/about/
    Template: twentyeleven
    Version: 0.1.0
    */

    and a file called
    header.php
    which has EXACTLY the same code in it copied from
    Twenty Eleven
    Appearance>Editor>(Click on header.php on the right hand side)

    Is this correct so far now?

    No. Edit the child’s style.css file and add:

    @import url(../twentyeleven/style.css);

    The edit the child’s header.php file and immediately before the second occurrence of <?php get_search_form(); ?> add:

    <div id="email-block></div>

    Thread Starter coffee_king

    (@coffee_king)

    OK, right.
    I have edit the child’s style.css file and added:

    @import url(../twentyeleven/style.css);

    And now the website looks how it used to.

    I have also edited the child’s header.php file and immediately before the second occurrence of <?php get_search_form(); ?> add:

    <div id=”email-block></dv>

    So now what do I do next?
    Many thanks for your help (I seem to be getting there now)

    OK – we’re going to need to move that code addition down slightly. Can you edit header.php and move <div id="email-block></div> down 2 lines so that it’s below the <?php endif; ?>? How large is this email image?

    Thread Starter coffee_king

    (@coffee_king)

    Hi
    Ive just done that and up loaded it, but if I preview it it makes the links to other pages below the header image (that were horizontal across the page) vertical.
    Please advise?

    Check the code you have added. It should be <div id="email-block></div>.

    Thread Starter coffee_king

    (@coffee_king)

    Also the image I want PART of to become a clickable email link is the header image, that is 1000 × 288 pixels

    Image here
    https://contemporaryfunctionband.co.uk/wp-content/uploads/2011/10/header-plus-email1.jpg

    I only want the part at the top that has the email address to be an email link, I want all the rest of the image to go back to home page when clicked on.

    Thread Starter coffee_king

    (@coffee_king)

    I copied/pasted your earlier post which stated
    <div id=”email-block></dv>
    not
    <div id=”email-block></div>

    I have now corrected it and re-uploaded but the page links still arnt sitting right (Its actually online like this now).

    It doesnt need an extra ” at the end does it ? (Just a guess)

    Yes – it does, Sorry:

    <div id="email-block"></div>

    Thread Starter coffee_king

    (@coffee_king)

    I believe you meant to type
    <div id=”email-block”></div>

    But no problem.
    Right, thats online now and the website looks ok again.
    So onto the image mapping?

    How large is this email image? And where is to to be positioned?

    Thread Starter coffee_king

    (@coffee_king)

    The image I want PART of to become a clickable email link is the main header image, thats displayed on every page.
    It is 1000 × 288 pixels

    Image here
    https://contemporaryfunctionband.co.uk/wp-content/uploads/2011/10/header-plus-email1.jpg

    I only want the part at the top that has the email address to be an email link, I want all the rest of the image to go back to home page when clicked on.

    Understood but the email link has to have a size & position.

    Thread Starter coffee_king

    (@coffee_king)

    Hi
    The position then is (in pixels)

    Start From Across 660
    Start From Down 4

    End at 856 Across
    End at 16 Down

    So the size from this would be a rectangle shape
    196 across x 12 down

    I take it this is what you meant?

Viewing 15 replies - 16 through 30 (of 40 total)
  • The topic ‘How can I add an email link to my header image?’ is closed to new replies.