Site logo

[Resolved] Add comment policy via snippet?

Home Forums Support [Resolved] Add comment policy via snippet?

Home Forums Support Add comment policy via snippet?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #493872
    LoGP

    Hey,

    Is there a way to add a comment policy via a code snippet?

    I could edit the comments.php file like so:

    https://www.business2community.com/blogging/add-a-comment-policy-message-to-your-wordpress-website-comment-form-0478014

    But if there’s a code snippet that would be better 🙂

    Cheers
    L

    #494030
    Tom
    Lead Developer
    Lead Developer

    Looks like WordPress has this action: comment_form_after

    add_action( 'comment_form_after', 'tu_after_comment_form' );
    function tu_after_comment_form() {
    ?>
        Your text in here.
    <?php
    }
    #494573
    LoGP

    Nice man! It works.

    I eventually used: comment_form_top to have the text between “leave a reply” and the form.

    🙂

    Cheers
    Lorenzo

    #494891
    Tom
    Lead Developer
    Lead Developer

    Awesome, glad I could help! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.