Home / Admin / Tasty Roundups – Change Heading from h2 to h3
Duplicate Snippet

Embed Snippet on Your Site

Tasty Roundups – Change Heading from h2 to h3

Change all your Tasty Roundup headings from h2 tags to h3 tags

<10
Code Preview
php
<?php
add_filter( 'render_block_tasty-roundups/item', function ( $block ) {
    $initial_block = $block;
    $block = preg_replace( '~<h2(.*)</h2>~is', '<h3$1</h3>', $initial_block );
    if ( ! $block ) {
       return $initial_block;
    }
    return $block;
} );

Comments

Add a Comment