WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Fourteen
Delete "Your email address will not be published" (6 posts)

  1. puppypablo
    Member
    Posted 5 months ago #

    Does anyone know how to delete "Your email address will not be published" in the comment section? I have successful deleted the email and URL fields, but don't know how to get rid of that line. Thanks for any help.

  2. esmi
    Forum Moderator
    Posted 5 months ago #

    Do not edit the Twenty Fourteen theme. It is the current default WordPress theme and having access to an original, unedited, copy of the theme is vital in many situations. First create a child theme for your changes. Or install a custom CSS plugin.

  3. puppypablo
    Member
    Posted 5 months ago #

    Thank you, esmi. I know. That plugin you suggested is good to know about, although it is too advanced for me. I am using many plugins. I wish I could find one to remove comment fields but I can't find one. Other forums suggest adding code to the functions page. Editing that page has crashed my site more than once, but that particular suggestion did work - minus the "Your email will not be published" line. I am keeping detailed notes on changes. But I know it's not ideal.

  4. WPMU DEV
    Member
    Posted 5 months ago #

    Hi @puppypablo,

    To delete "Your email address will not be published" in the comment section, add following code in the functions.php file of your child theme or add it in your site using any of the following plugins.

    function custom_comment_form_defaults($defaults){
    	$defaults['comment_notes_before'] = '<p class="comment-notes">' . sprintf( __('Required fields are marked %s'), '<span class="required">*</span>' ) . '</p>';
    	return $defaults;
    }
    add_filter( 'comment_form_defaults', 'custom_comment_form_defaults' );

    http://wordpress.org/plugins/add-actions-and-filters/
    http://wordpress.org/plugins/code-snippets/

    If you want to just hide it then add following CSS code in the style.css file of your child theme or add it in your site using any of the following plugins.

    #comments .comment-notes{
    display: none !important;
    }

    http://wordpress.org/plugins/my-custom-css
    http://wordpress.org/plugins/simple-custom-css

    Best Regards,

  5. puppypablo
    Member
    Posted 2 months ago #

    Thank you WPMU DEV! Sorry, I just saw this. It worked! I used the first code and the plugin 'add actions and filters.' I tried the code snippets plugin first and it crashed my site, but the other one worked perfectly. Again, thanks!

  6. WPMU DEV
    Member
    Posted 2 months ago #

    You are most welcome, if we can be of any further assistance please don't hesitate to ask :)

Reply

You must log in to post.

About this Theme

About this Topic