Adding text above comment field (4 posts)

  1. BTBWmommy
    Posted 5 years ago #

    I wanted to add some text above the comment field. How would I do that? I use theme Hanging 2.0

  2. BTBWmommy
    Posted 5 years ago #

    And how do I show a comment count in my post (with OUT clicking on the post title)


  3. esmi
    Forum Moderator
    Posted 5 years ago #

  4. Chip Bennett
    Theme Review Admin
    Posted 5 years ago #

    The Theme that you're using has slightly old markup, and does not use the WordPress comment_form() function. If it did, adding text above the comment field would be a simple matter of adding something like this to your functions.php file:

    function mytheme_comment_form_precomment_text() { ?>
         <p>Text to add above comment field goes here.<?p>
    <?php }
    add_action( 'comment_form_after_fields' , 'mytheme_comment_form_precomment_text' );

    However, since your Theme adds the comment reply form markup itself, you'll have to go into the markup, and add the text yourself, accordingly.

    Whatever you do, make sure that any changes are made in a Child Theme, and not in the Theme itself.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.