Allow WordPress Shortcodes within Contact Form 7 WordPress Plugin

, , ,

The free Contact Form 7 plugin for WordPress is great. To expand its ability, by permitting the use of shortcodes, we save ourselves much coding. Here is how to permit the use of shortcodes within the Contact Forms themselves.


Allowing Shortcodes in Contact Form 7

Simply add this code to the “functions.php” file within your child theme.



** Contact Form 7: Permit Shortcodes Within Forms
add_filter( 'wpcf7_form_elements', 'mycustom_wpcf7_form_elements' );
function mycustom_wpcf7_form_elements( $form )

    $form = do_shortcode( $form );
    return $form;


If this article was helpful please take a moment to like us on Facebook, share this on your social media or buy us a cup of coffee.