<?php // --- Change '1' to your form's ID --- $form_id_to_render = 33; // Get the form's HTML into a variable $form_html = do_shortcode( '[fluentform id="' . $form_id_to_render . '"]' ); // This more robust regex looks for an h1, h2, etc., // that has the class "ff-form-title" and removes it. $pattern = '/<(h[1-6]).*?class=".*?(ff-form-title).*?".*?>.*?<\/\1>/s'; $clean_html = preg_replace( $pattern, '', $form_html, 1 ); // Echo the final, modified HTML echo $clean_html; ?>