WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Edit HTML output on Jetpack Comments (5 posts)

  1. Bryan Hoffman
    Member
    Posted 11 months ago #

    Is there a filter or a hook available to edit the HTML output of the comment system title?

    I'd like to add a <span> around the 'Leave a Reply' title as such:

    <h3 id="reply-title" class="comment-reply-title"><span>Leave a Reply</span></h3>

    See it here:
    http://spigotdesign.com/2013/07/the-spigot-rorschach-test/#reply-title

    http://wordpress.org/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 11 months ago #

    I'm afraid you won't be able to edit the HTML in the form without making changes to the Jetpack plugin itself, in modules/comments/comments.php. We offer an option to customize the comment form title via Settings > Discussion in your dashboard, but this field won't allow you to add HTML tags to that title.

  3. Bryan Hoffman
    Member
    Posted 11 months ago #

    Is there any way that the plugin could honor the filters the default comment system has available? Something like:

    add_filter( 'comment_form_defaults', 'my_comment_form_defaults', 11 );
    
    function my_comment_form_defaults( $defaults ) {
    
        $defaults['cancel_reply_link'] = __( '<i rel="tooltip" title="Cancel Reply" class="icon-remove-circle"></i>' );
        $defaults['title_reply'] = __('<span>Leave a Reply</span>');
        $defaults['title_reply_to'] = __('<span>Leave a Reply to %s</span');
    
        return $defaults;
    }
  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 11 months ago #

    We do plan on offering more ways to customize the Jetpack Comment form in the future, and we will certainly do our best to use the default comment filters whenever possible.

    I don't have an ETA for this at the moment, but you can keep an eye on the changelog to get to know when we will introduce such changes.

  5. Bryan Hoffman
    Member
    Posted 11 months ago #

    Thanks Jeremy.

Reply

You must log in to post.

About this Plugin

About this Topic