View Full Version : WordPress <?php email_author?> in mailto link not working

Jun 5th, 2010, 06:28 PM
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?

Jun 5th, 2010, 06:43 PM
Why is this in the HTML forum?
Is the email set in the WordPress user's account?

Jun 5th, 2010, 07:00 PM
According to http://codex.wordpress.org/Function_Reference/the_author_email this function is deprecated.

The suggested replacement is: the_author_meta('user_email')