How to remove the h6 tag for the entry-category Class

Question

On my single blog pages at the very beginning, I have the html

<h6 class="entry-category is-xsmall">
    <a href="www.website.com" rel="category tag">category title</a></h6>

I want to remove the h6 tag from all blog pages. In this forum, I found a solution for removing the h3 at the comments:

    function my_comment_form_before() {
    ob_start();
}
add_action( 'comment_form_before', 'my_comment_form_before' );

function my_comment_form_after() {
    $html = ob_get_clean();
    $html = preg_replace(
        '/<h3 id="reply-title"(.*)>(.*)</h3>/',
        '<p id="reply-title"1>2</p>',
        $html
    );
    echo $html;
}
add_action( 'comment_form_after', 'my_comment_form_after' );

I tried to change it to the h6 problem:

function my_comment_form_before() {
        ob_start();
    }
    add_action( 'comment_form_before', 'my_comment_form_before' );
    
    function my_comment_form_after() {
        $html = ob_get_clean();
        $html = preg_replace(
            '/<h6 class="entry-category is-xsmall"(.*)>(.*)</h6>/',
            '<p id="reply-title"1>2</p>',
            $html
        );
        echo $html;
    }
    add_action( 'comment_form_after', 'my_comment_form_after' );

But it is not removing the h6. How can I remove it the right way?

0
flx 4 months 0 Answers 8 views 0

Leave an answer