Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had a similar problem and changing the cpt-onomy.php to this fixed it:

    [huge paste deleted. Please use pastebin.com or gist.github.com to paste code and put a link here.]

    Frontliner, TheRealMaN_, I just ran into this issue. Quick fix, that doesn’t actually fix anything do to how wpautop works, it to minify your html. This has the drawback of not being able to strip out lines with blank mailtags. Also, wpautop will still randomly add in opening <p>s, and this may still effect your layout. You can always go into wp-content > plugins > contact-form-7 > includes > mail.php to line 51, currently, and remove “$body = wpautop( $body );”. Of course this change gets overridden if you update the plugin. I was fiddling around with the idea of using some code that runs before the plugins get initialized to open that particular file and just do a str_replace to remove the line. That way you can update, and it would still remove that line. Of course that has the trade off that some future update might rely on that bit of code, and you will break the plugin, but I feel like that can be a risk worth taking. There are a number of other random hacks in the same vein that are probably ‘cleaner’. I really hope the plugin owner will just wrap that call in an if statement to check for the WPCF7_AUTOP that already exists, or perhaps adding one specifically for the email…

Viewing 2 replies - 1 through 2 (of 2 total)