• 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

How to Customize Comment Box in News Pro Theme?

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 › Design Tips and Tricks › How to Customize Comment Box in News Pro Theme?

This topic is: not resolved

Tagged: Comment Box

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 2 months ago by davidroccato.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 31, 2015 at 2:34 pm #146302
    davidroccato
    Participant

    Hi,

    I'd like to change my comment box in 3 things. Is there anyone that could be so kind to help?

    I have found 3 plugins that each one does only 1 thing I need and I don't really want to use 3 plugins for that.

    1) REMOVE completly the Website/url field
    2) CONVERT everything in the message in plain text - no html, formatting or hyperlinks allowed.
    3) REMOVE comment notes at the bottom of the comment box

    For your record, these are the 3 plugins that do the above:
    1) https://wordpress.org/plugins/remove-comment-websiteurl-box/
    2) https://wordpress.org/plugins/peters-literal-comments/
    3) https://wordpress.org/plugins/remove-comment-notes/

    For what I have understood, I should add some code at the bottom of the functions.php of my theme.

    Is there anyone that could tell me what kind of code I should put there? Because I don't have any idea. But is the logic right? Is it enough to add the right code at the bottom of the functions.php of the child theme and that will be enough?

    Thanks

    http://italianeography.com
    March 31, 2015 at 6:18 pm #146318
    ᴅᴀᴠɪᴅ
    Member

    Yes, adding the code to the bottom of your functions.php is the way to do it.

    Luckily, as Genesis just uses the default WordPress comments form, there is a sea of WordPress tutorials written already with how to do what you are wanting to do.

    For example, for the first question the answer is here. Scroll down to the part titled "Remove Website URL From Comment Form"


    I love helping creative entrepreneurs build epic things with WP & Genesis.

    Follow on Twitter

    April 1, 2015 at 3:55 am #146348
    davidroccato
    Participant

    Hi David, thank you for your reply.

    I've looked around and I've found few things but they are not all exaclty and I'd like to compact them in just one function. But I don't feel to do any test without being more or less sure before. This is what I've found.

    1) This will remove the comment notes and do other things

    //***Customize The Comment Form**/
    add_filter( 'comment_form_defaults', 'bourncreative_custom_comment_form' );
    function bourncreative_custom_comment_form($fields) {
    	$fields['comment_notes_before'] = ''; //Removes Email Privacy Notice
        $fields['title_reply'] = __( 'Share Your Comments & Feedback:', 'customtheme' ); //Changes The Form Headline
    	$fields['label_submit'] = __( 'Share My Comment', 'customtheme' ); //Changes The Submit Button Text
    	$fields['comment_notes_after'] = ''; //Removes Form Allowed Tags Box
        return $fields;
    }

    2) This will remove the URL

    function crunchify_disable_comment_url($fields) { 
        unset($fields['url']);
        return $fields;
    }
    add_filter('comment_form_default_fields','crunchify_disable_comment_url');
    

    3) This is the one you gave me that do the same above but in another way.

    add_filter( 'comment_form_default_fields', 'remove_comment_author_website_url_field' );
    function remove_comment_author_website_url_field( $fields ) {
    
    if ( isset( $fields['url'] ) )
    unset( $fields['url'] );
    
    if ( isset( $fields['fields']['url'] ) )
    unset( $fields['fields']['url'] );
    
    return $fields;
    }

    Is the point 2 enough? Can I just add the line  unset($fields['url']); to the first function?

    Also, in the first function maybe I should replace with: comment_form_default_fields

    4) If the above is correct, what I miss is just how to convert in plain text the message.

    I've seen that there is the option $fields ['format'] = 'xhtml'; but I don't know if this make sense and if I can change it in just simple text.

    Thank you very much,
    Davide

    April 2, 2015 at 1:26 pm #146488
    davidroccato
    Participant

    Anyone? I'm quite sure the answer is not too far from here but I would prefer to get closer before doing some test. This weekend I'll probably have more time to test everything.

    Thanks a lot.

    April 3, 2015 at 8:11 am #146548
    davidroccato
    Participant

    Update.

    I tried and at the end the only codes that worked were the ones David (thanks a lot) gave me from Brad. The others simply break the site, even the ones written from studiopress here: http://my.studiopress.com/snippets/comments/

    I could fix the point 1 and 2 but I can't find anything for converting the messages in plain text.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2025 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