[Plugin: Contact Form 7] How Do I Get Rid of the <br /> Tag After the Opening Div? (2 posts)

  1. sembasics
    Posted 6 years ago #

    Hi there,

    I really like this plugin, but there is just one stylistic problem that I need help taking care of. I notice that the form tags are automatically surrounded by a div tag. However, this div tag is followed by a
    and then comes the <form> tag. I don't want this
    tag and I can't figure out how to get rid of it. Any suggestions?

    Here, btw, is the code in question:

    <div id="wpcf7-f2-p29-o1" class="wpcf7"><br />
    <form enctype="multipart/form-data" class="wpcf7-form" method="post" action="/wordpress/site/?page_id=29#wpcf7-f2-p29-o1">

    Any help would be greatly appreciated.

    Thanks and be well,


  2. Takayuki Miyoshi
    Posted 6 years ago #

    The inserted br tag is not intended. Looks strange. Maybe wpautop() is working. Try this:

    1. Open wp-contact-form-7.php and find the line defining WPCF7_AUTOP constant. In the latest version it's on line 54.

    2. Change to define('WPCF7_AUTOP', <strong>false</strong>);

    If this doesn't fix the problem, you should doubt other plugins or theme conflicting.

    Are there any other users facing the same issue? I don't see br on my environment.

Topic Closed

This topic has been closed to new replies.

About this Topic