• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

I need to show the email adress in the comments

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › I need to show the email adress in the comments

This topic is: not resolved

Tagged: comments email, email field

  • This topic has 6 replies, 5 voices, and was last updated 10 years, 11 months ago by vajrasar.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • February 11, 2015 at 9:35 am #140472
    Ponies
    Participant

    So I'm working on a site where people post their testimonials in the comment section of a certain page. The people know that their email will get shown and have given us permission to show it to the public so they can be asked questions about their testimonial via email.

    Problem is: how do I make it happen so that the email adress gets shown? What piece of code do I have to post where? Please advise. Thank you very much.

    May 7, 2015 at 7:57 am #150646
    Susan
    Moderator

    As you posted this a while ago, I hope you were able to get your issue resolved. If it is resolved, please mark this thread as “resolved”, so it can be closed.

    If you are still having issues, report back here, and I will try to escalate.

    May 7, 2015 at 8:00 am #150656
    Ponies
    Participant

    Well it is not resolved.
    I wasn't able to get an answer either on the forums nor elsewhere on another site. Which is quite fascinating since the value is there in the database and I just need to get it shown on the website.
    If you are able to provide a solution I'd be very grateful.

    May 25, 2015 at 10:48 am #153566
    Ponies
    Participant

    So any help in this matter would be really appreciated.

    May 25, 2015 at 12:31 pm #153571
    nciske
    Member

    This should get you started:
    http://wpsmackdown.com/add-content-post-authors-comment/

    I'd strongly recommend you use a plugin like CryptX to obfuscate the emails of your users (the JavaScript method works best). They may have given you permission to use them, but allowing them to be spammed mercilessly was unlikely part of that agreement 😉

    Even better, never output the email and use a seperate form to allow email to go to your users without ever revealing their email (until they respond of course).


    Nick Ciske | https://luminfire.com/ | @nciske
    Did I help you? Say thanks: http://bit.ly/1lahwy0

    May 25, 2015 at 1:50 pm #153577
    Ren Ventura
    Member

    I personally like the form idea mentioned by @nciske but it would require more work. Displaying users' emails can definitely lead to them getting spam, which is not cool for anyone.

    If you need to show the email, you will want to use the antispambot() function in WordPress (see link below). This converts the email into HTML entities so that it's still rendered properly in the browser but email-harvesting scripts won't pick it up.

    For retrieving the commenter's email, you can use get_comment() and output the escaped email using something like one of the WordPress comment filters or genesis_after_comment action.

    In a nutshell, get_comment() will get you the data you need, antispambot() will escape the email to protect it from harvesting and then displaying it is your call.

    https://codex.wordpress.org/Function_Reference/antispambot


    Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren

    May 26, 2015 at 6:35 am #153624
    vajrasar
    Member

    is this helpful - https://codex.wordpress.org/Function_Reference/comment_author_email_link


    I make WordPress websites using Genesis Framework.

    WordPress/Genesis Development | Customizations

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble