Remove <p> Tag From Contact Form 7
In Contact For 7, there is annoying behavior. By default, it is wrapping contents into <p> tags, like in the case of generic posts. Unlike in a post here, this is mostly unusable because we often want a custom layout for our forms which is prevented by the paragraph elements wrap.
Fortunately, it is easy to turn it off, add the following line to your wp-config.php
file:
define( 'WPCF7_AUTOP', false );
You can also use a filter in your theme (functions.php) or your plugin:
add_filter('wpcf7_autop_or_not', '__return_false');
The last snippet does the some but it attach the code to the theme and not to the WP instance.