[Resolved] How to add your email address will not be published

Home Forums Support [Resolved] How to add your email address will not be published

Home Forums Support How to add your email address will not be published

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #568932
    CRISTO

    This question was asked a couple years ago, and Tom gave this suggestion. But when I use the simple php plugin to add it to my site it does not seem to work. Am I missing something?

    add_action( ‘generate_below_comments_title’,’generate_comments_email_message’ );
    function generate_comments_email_message()
    {
    ?>
    <p class=”comments-email-message”>Your email address will not be published. Required fields are marked with *.</p>
    <?php
    }

    #568943
    Tom
    Lead Developer
    Lead Developer

    That should work. How are you adding the PHP?

    #568961
    CRISTO

    Using Code snippets plugin. Always worked OK so far (a few neg reviews, but that always happens)….perhaps if there is some css I could use instead? I use your simple css plugin….works great of course.

    #569247
    Tom
    Lead Developer
    Lead Developer

    Hmm, that should work. You’re sure the snippet is activated?

    #569550
    CRISTO

    Good question, but yes, it’s activated to ” run snippet everywhere”

    I use it for a couple other things, search box and mobile header, and it works fine.

    Maybe some setting I have wrong somewhere else? Or perhaps I copied the snippet wrong?

    Again, this is my snippet:

    add_action( ‘generate_below_comments_title’,’generate_comments_email_message’ );
    function generate_comments_email_message()
    {
    ?>
    <p class=”comments-email-message”>Your email address will not be published. Required fields are marked with *.</p>
    <?php
    }

    #569878
    Tom
    Lead Developer
    Lead Developer

    Let’s try this instead:

    add_action( 'comment_form_top', 'tu_comments_notify_message' );
    function tu_comments_notify_message() {
    	echo '<p>Your email address will not be published. Required fields are marked with *.</p>';
    }
    #569910
    CRISTO

    Tom, Tom, Tom…..you deserve a raise. Worked perfectly. Thanks so much. Sorry about the raise, though, things are a little tight right now.

    #570098
    Tom
    Lead Developer
    Lead Developer

    Glad I could help! 🙂

    #570122
    CRISTO

    Your service in phenomenal…..great help to a novice like me.

    #570123
    Tom
    Lead Developer
    Lead Developer

    Thank you! That’s great to hear 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.