Skip to content

Instantly share code, notes, and snippets.

@prosantamazumder
Created April 17, 2021 21:26
Show Gist options
  • Save prosantamazumder/4375d3245778221fb688df9af9ea415c to your computer and use it in GitHub Desktop.
Save prosantamazumder/4375d3245778221fb688df9af9ea415c to your computer and use it in GitHub Desktop.
How to Remove <p> and <br /> from Contact Form 7
Are you looking for a way to remove all of the extra <p> and <br /> from your forms? Contact form 7 is a great tool but sometimes it adds a little extra HTML that you might want to get rid off within your pages and posts. We have created a quick code snippet that you can use to remove <p> and <br /> from Contact Form 7.
Instructions:
All you have to do is add this code to your wp-config.php file:
define('WPCF7_AUTOP', false );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment