• 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

Changes to comment_form via filter

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 › Changes to comment_form via filter

This topic is: not resolved

Tagged: add_filter comment_form

  • This topic has 6 replies, 2 voices, and was last updated 12 years, 1 month ago by Tony @ AlphaBlossom.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • September 7, 2014 at 9:19 am #123151
    Edward
    Member

    Hi. I'm new to Genesis & wordpress dev. Looking for a code snippet to change the "Comment" label to say "Notes" instead. Preferably I would like to use an add_filter function in my child-theme functions.php file. Any help is greatly appreciated.

    comment_form

    September 7, 2014 at 1:14 pm #123183
    Tony @ AlphaBlossom
    Member

    Hello,

    You can do this with the default WordPress filter, adding this code to your theme's functions.php file:

    
    add_filter( 'comment_form_defaults', 'youruniqueprefix_change_comment_label' );
    
    function youruniqueprefix_change_comment_label( $args ) {
    	$args['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( 'Note', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>';
    	return $args;
    }
    

    Have a great day.

    Tony


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    September 7, 2014 at 1:34 pm #123189
    Edward
    Member

    Thanks, Tony! Much appreciated. Have a great day.

    September 7, 2014 at 3:14 pm #123210
    Edward
    Member

    Tony, one last question. How do I remove the website input box?

    This is what I added:

    $args['fields'] = array(
    'url' => ''
    );

    But, then all my input boxes above the comment box disappeared.

    Then, I copied the additional fields from lib\structure\comments.php ( $commenter, $req, $aria_req, $author, $email ) and set $url to blank but the text labels appear messed up underneath the input box. I just started learning this so I'm confused on how to accomplish this.

    Thanks, mate!

    September 7, 2014 at 4:05 pm #123218
    Tony @ AlphaBlossom
    Member

    Use this to remove the URL field:

    
    /*
    * Remove URL field
    *
    */
    add_filter( 'comment_form_default_fields', 'youruniqueprefix_remove_comments_form_url_field' );
    function youruniqueprefix_remove_comments_form_url_field( $fields ) {
        if( isset( $fields['url'] ) )
            unset( $fields['url'] );
        return $fields;
    }
    

    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    September 8, 2014 at 9:33 am #123390
    Edward
    Member

    Tony, thanks you are awesome! What sites/resources would you recommend for learning WordPress/Genesis development? Also, do you offer coaching/tutoring services? We'll definitely be contacting your company for Genesis work.

    September 10, 2014 at 10:44 pm #123862
    Tony @ AlphaBlossom
    Member

    Hi Edward,

    Glad I could help!

    As far as resources, there's a lot of good ones...here's some:

    Home


    http://sridharkatakam.com/
    http://www.bourncreative.com/
    http://www.web-savvy-marketing.com/
    http://www.carriedils.com/

    BobWP


    http://bradpotter.com/
    https://www.facebook.com/groups/genesiswp/

    And of course our website 🙂 I recommend following all of these people on twitter...there's a lot more talented people in the Genesis community, but these are a great start.

    I'm sorry I don't offer coaching...working on a training program but it's a ways out still.

    Thanks for the nice compliment...and I'm happy to help in the future in any way I can.

    Take care,
    Tony


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

  • 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