write a joomla function to find the first h2 tag in the content and insert a html content after this tag
function joomla_function( $content ) { $content = preg_replace('/(<h2[^>]*>)/', '$1' . '<div class="extra-content">', $content, 1); return $content; } add_filter( 'the_content', 'joomla_function' );