[Resolved] Change comments h class or add additional css to exclude in table of content

Home Forums Support [Resolved] Change comments h class or add additional css to exclude in table of content

Home Forums Support Change comments h class or add additional css to exclude in table of content

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1148939
    Tomas

    Hi,

    Trying to figure out how to exclude comments in Elementor table of content widget.

    Either i have to change comments h3 to h4 or add additional css to comments so it can be excluded in table of content widget.

    Is there any workaround about this.

    Kind Regards
    Jerker from Sweden

    #1149141
    David
    Staff
    Customer Support

    Hi there,

    try this PHP Filter snippet to change the H3 to H4:

    add_filter( 'comment_form_defaults', 'custom_reply_title' );
    function custom_reply_title( $defaults ){
      $defaults['title_reply_before'] = '<h4 id="reply-title" class="comment-reply-title">';
      $defaults['title_reply_after'] = '</h4>';
      return $defaults;
    }
    #1149216
    Tomas

    Hi David,

    Many thanks. Worked like a charm.

    #1149439
    David
    Staff
    Customer Support

    Glad to be of help

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