WordPress.org

Support

Support » How-To and Troubleshooting » how to add text for comment rules manually to template

how to add text for comment rules manually to template

  • Since I get a few wildly offensive comments once in a while, I’d like to add some text above the comment box describing rules for what types of comments won’t be published. I assume I’d add this in the comment template. If so, can someone tell me where in the code I’d add the text?

Viewing 2 replies - 1 through 2 (of 2 total)
  • As you said: above the text area.
    Open your comments.php file and find where the form starts – usually it is something like:
    <form action=...
    and place your text above it (don’t forget to format, i.e. put some tags p, span, class, whatever around to be able to style it in the stylesheet).

    Thanks, Moshu. I did some experimenting within the comment template & found the right place.

    In my theme, Almost Spring, I placed it right before this code:
    <p>
    <textarea name="comment" id="comment" cols="70" rows="10" tabindex="4"></textarea>
    </p>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to add text for comment rules manually to template’ is closed to new replies.
Skip to toolbar