Skip to:
Content
Pages
Categories
Search
Top
Bottom

Edit the comment box size


  • juventino199
    Participant

    @juventino199

    Hi there,

    Just a quick question,

    my replies box (where users type in their comments) is quite large and many people won’t be filling this up, resulting in it taking up unnecessary space on my page. Is there a way to decrease this size as the default and then, if needed, the user can manually increase the size of the box using the increaser at the bottom right?

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robin W
    Moderator

    @robin-w

    this (untested) should work

    add_filter ('bbp_after_get_the_content_parse_args', 'change_rows') ;
    
    function change_rows ($args) {
    	if ($args['context'] == 'reply' ) {
    		$args['textarea_rows'] = '6' ;
    	}
    return $args ;
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets


    juventino199
    Participant

    @juventino199

    Thank you very much, the code works perfectly after placed in my child theme.


    Robin W
    Moderator

    @robin-w

    🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar