Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter muchmuch11

    (@muchmuch11)

    I created this function, is this correct?

    function modify_comment_field_548 ($arg) {
        $arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">Comment</label> <textarea id="comment" name="comment" cols="45" rows="6" maxlength="65525" required="required"></textarea></p>';
        return $arg;
    }
    
    add_filter('comment_form_defaults', 'modify_comment_field_548');

    Thanks

    • This reply was modified 5 years, 2 months ago by muchmuch11.

    Does it work?

    Thread Starter muchmuch11

    (@muchmuch11)

    It works but I don’t know if I do it corectly. lol

    Well, you are setting it to exactly what you want, whereas you could simply adjust whatever is there. It depends on whether you are creating it for one site or to work on all sites.
    If you don’t use any plugins that affect comments, and this matches your theme, then that’s good enough for that site.
    If you are putting it into a plugin you will distribute, it would be better to do a replace on the number instead of forcing it to look like you have it hard-coded.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to change wp comment field rows count’ is closed to new replies.