• I modified Twentysixteen to meet my requirement. Most modifications I did with a child theme and some modifications with the theme customizer.

    The comment area has 8 visible lines.
    I reduced it to 4 lines in the file:
    wp-includes/comment-template.php
    as shown here:
    old:
    <!–
    textarea id=”comment” name=”comment” cols=”45″ rows=”8″ maxlength=”65525″‘ . $required_attribute . ‘></textarea
    –>
    new:
    <!–
    textarea id=”comment” name=”comment” cols=”45″ rows=”4″ maxlength=”65525″‘ . $required_attribute . ‘></textarea
    –>

    How can I handle it outside the core of WordPress?
    FYI: I have a functions.php in my child theme.
    Thx in advance for your hints.

    • This topic was modified 1 year, 11 months ago by fercher.
    • This topic was modified 1 year, 11 months ago by fercher.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • How can I handle it outside the core of WordPress?

    For this basic change (controlling the height of the comment form), you can do it with just CSS. There’s no need to edit any PHP files at all.

    Use something like:

    textarea#comment {
         height: 500px;
    }

    This CSS will work irrespective of the rows value you have in the HTML, as the CSS property takes priority over the HTML attribute. (Change the height value to whatever works best for you).

    To do advanced customization of the entire comment section (including the comment form) beyond simple CSS styling, you’d normally clone the parent theme’s comments.php file into the child theme and customize it.

    The theme’s comments.php file will typically have a call to the comment_form() function, which loads the default comment forum from the core file you referenced.

    Good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘How to change Twentysixteen theme outside the WordPress core?’ is closed to new replies.