Display custom field value as a mailto: link
well you did all the hard stuff, so you can try this: while ( $loop->have_posts() ) : $loop->the_post(); $mail = get_post_meta($post->ID, ‘mail’, true); if ($mail) { echo ‘<a href=”https://wordpress.stackexchange.com/questions/60953/mailto:”.$mail.'”>email me at ‘.$mail.'</a>’; } /* … */