Support » Installing WordPress » Authors email address in posts

  • Apologies if this is a dumb question but I’ve looked everywhere and cant find out how to automatically add the author’s name and email address to a post

    Can anyone help please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • you just need to add –

    <?php the_author_posts_link() ?>

    see for example, authors name appears as link.

    actually, that’s the authors name as a link to his other posts, but this:

    <?php the_author_email() ?>

    returns the authors email address, so i would use something like:

    posted by <?php the_author_posts_link() ?> who can be contacted at <?php the_author_email() ?>

    I would also adjust the comments form so that authors know they are posting their email!

    Spam bots harvest those too, you know.

    a quick note, the code that I posted above isn’t for the comments, it’s for the author of the original blog post.

    if you’re looking for the same info/style for comments, you need to use –
    <?php comment_author_link() ?> for the comment author’s name with link to profile,
    <?php comment_author_email() ?> will display authors email address.
    <?php comment_author_email_link() ?> as above but is a link.

    other comment related filters/template tags are:

    documentation for hooks/filters and template tags can be found here:

    As far as the spam bots/harvesters, it’s easy enough to “encode” the email addresses similar to the way that moveable type does (in the html the actual html character codes are used, but they render as a human readable email address/link), the bots/harvesters can’t touch them.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Authors email address in posts’ is closed to new replies.