Include email address in the To: textbox link

Discussion in 'Andrina WordPress Theme' started by ajadams, Feb 20, 2013.

Thread Status:
Not open for further replies.
  1. ajadams

    ajadams New Member

    Joined:
    Feb 12, 2013
    Messages:
    7
    Likes Received:
    0
    Thanks for the great WordPress themes!

    I pasted the following code into the front-page.php file to create link to email application:

    <div class="grid_7">
    <div class="index-info-two">
    <a href="mailto:<?php if (inkthemes_get_option('inkthemes_email_add') != '') { ?>">
    <span><?php echo stripslashes(inkthemes_get_option('inkthemes_email_add')); ?></a></span>
    <?php } else { ?>
    <span><?php _e('[email protected]','andrina'); ?></span>
    <?php } ?>
    </div>
    </div>

    However it does not place my email address in the To: textbox. Any way to do this?

    Thanks,

    Andrew
     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Undo old customization and
    Go to the front-page.php present in your theme directory and add the code given below

    Code:
    <a href="Enter your link address"></a>
    Sending image for reference



    [​IMG]
     
  3. ajadams

    ajadams New Member

    Joined:
    Feb 12, 2013
    Messages:
    7
    Likes Received:
    0
    Ok, your code suggestion did not work.

    However, I added my email address to the code like this and it did work.

    <a href="mailto:my_email_address<?php if (inkthemes_get_option('inkthemes_email_add') != '') { ?>">
    <span><?php echo stripslashes(inkthemes_get_option('inkthemes_email_add')); ?></a></span>

    Now when I click on the link, my_ email_address has populated the To: textbox.

    Thanks for you effort.

    Andrew
     
  4. ajadams

    ajadams New Member

    Joined:
    Feb 12, 2013
    Messages:
    7
    Likes Received:
    0
    Oops,

    My bad, it does work like you suggested! I was putting the quotes around the "my_email_address".

    Great work.

    Andrew
     
Thread Status:
Not open for further replies.

Share This Page