Support » Fixing WordPress » comment_author_email in a page

  • I’m editing my page.php template for my theme and I’m trying to get the current commenters email address to display within a subscription input box. I can’t get the email to appear.

    back to basics I’ve just tried to output the email address on the page using the following attempts

    Email should appear here: <?php comment_author_email(); ?>
    or here <?php echo $comment_author_email; ?>

    note: at the bottom of the page I have the standard commenting form and the email address does appear in the standard email input box.

    What am i doing wrong or does this function only work from comments.php?

  • The topic ‘comment_author_email in a page’ is closed to new replies.