WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/comment author email link

Contents

Description

Displays the comment author's email address, as a mailto link. An email address must be provided if "User must fill out name and email" is enabled under Discussion Options. This tag must be within The Loop, or a comment loop.

Note: Displaying email addresses is not recommended, as it provides spam collection tools the opportunity to cull them from your site.

Use get_comment_author_email_link to retrieve the value.

Usage

 <?php comment_author_email_link('linktext''before''after'); ?> 

Examples

Default Usage

email: <?php comment_author_email_link(); ?><br />

Link Text and Styling

Displays comment author's email link as text string Email Comment Author and adds arrows before and after the link to style it.

<?php comment_author_email_link('Email Comment Author', ' > ', ' < '); ?>
> Email Comment Author <

Parameters

linktext 
(string) Link text for the email link. Default is the comment author's email address.
before 
(string) Text to display before the link. There is no default.
after 
(string) Text to display after the link. There is no default.

Related

Comments Functions

See also index of Function Reference and index of Template Tags.