Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2010
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    WordPress <?php email_author?> in mailto link not working

    I am trying to set up some code in WordPress that looks like this:

    <a href="mailto:<?php the_author_email(); ?>?">Email this Author</a>

    However, when I add this, it the email link will not show up at all.

    Any ideas?

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Why is this in the HTML forum?
    Is the email set in the WordPress user's account?

  • #3
    Regular Coder mbaker's Avatar
    Join Date
    Jan 2010
    Location
    Burford, Oxfordshire, United Kingdom
    Posts
    249
    Thanks
    1
    Thanked 39 Times in 39 Posts
    According to http://codex.wordpress.org/Function_...e_author_email this function is deprecated.

    The suggested replacement is: the_author_meta('user_email')
    - Michael Baker - HTML Tags Guide - Reference and Tutorials
    - Like voting, validate early, validate often - W3C HTML Validator - W3C CSS Validator
    - Wot? me cynical? no, its just if you vote, er, validate early, you have more chance of validating often.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •