CF7 doesn’t have any default <br />
tags that I know of.
Did you try your delete key?
You’d be surprised just how many times a blatantly obvious answer has eluded people. π
littlecuriosity, you don’t have to change the plugin’s code. Adding it to wp-config.php is better.
Controlling Behavior by Setting Constants
I tried updating WPCF7_AUTOP to false in wp-contact-form-7.php with no luck. I even tried updating it through the wp-config.php file but I still got those darn <br />
tags.
I sure wish the plugin would leave the use of both the <p>
and <br
> tags up to the user.
if ( ! defined( 'WPCF7_AUTOP' ) )
define( 'WPCF7_AUTOP', false );
Anyone have any suggestions?
In the end I was able to get the define( 'WPCF7_AUTOP', false );
to work correctly. I had it in the wrong place within the wp-config.php file. See Controlling Behavior by Setting Constants
Cheers!
Jules
Though I was able to get this working correctly in a v2.9 I am not able to get rid of the <br>
tags in v3.0. I’ve added it to my wp-config file above the “Happy blogging” like the instructions say on Controlling Behavior by Setting Constants
/* wp-contact-from-7 */
define ('WPCF7_AUTOP', false ); // set to false to remove <br> tags
/* That's all, stop editing! Happy blogging. */
What am I missing?
Jules
None of the above solutions worked for me. Simple solution, update the your theme CSS file? π
I added the following: .wpcf7-form-control-wrap br { display: none; }
BUMP.
that link is dead, poiseandapple :/
Wasn’t working for me until I just included this in my wp-config file:
define (‘WPCF7_AUTOP’, false );
I also deactivated the plugin and reactivated it and voila! no more pesky paragraphs and breaks!
Hope that works for you. I didn’t include the if not defined portion: if ( ! defined( ‘WPCF7_AUTOP’ ) ), since it is already defined by wp-contact-form-7.php, I figured it would not set it again in the wp-config file. I’m just presuming this is why some can’t redefine this to false but I haven’t verified that this is the case.
And you may not have to do the deactivate/reactivate part–but this is the process I went through, and now it’s working for me. I’m using Version: 2.4.4
http://voodoopress.com/2011/02/configuring-contact-form-7-to-work-perfectly-with-a-twentyten-child-theme/
Not sure if any of this will be helpful, but its a collection of stuff I had to do to get CF7 working perfectly with WP3.1 and twentyten…..
Thanks Rev. Very helpful. I just included some of those in my functions file and CSS.
Awesome, glad some of it was helpful for you!