• Resolved rcdncn

    (@rcdncn)


    All of a sudden, extra linebreaks <br /> are appearing between <label></label> and <input></input> or <option></option> tags throughout the site. This is appearing in pages generated by Theme My Login and WP Courseware.

    The php file looks like:

    <p class="tml-user-email-wrap">
    	<label for="user_email<?php $template->the_instance(); ?>"><?php _e( 'E-mail', 'theme-my-login' ); ?></label>
    	<input type="text" name="user_email" id="user_email<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'user_email' ); ?>" size="20" />
    </p>

    But the browser renders this out as:

    <p class="tml-user-email-wrap">
    	<label for="user_email">E-mail</label><br />
    	<input type="text" name="user_email" id="user_email" class="input" value="" size="20" />
    </p>

    This was not the behaviour previously. I removed all customizations from register-form.php and theme-my-login-custom.php to test.

    I was able to remove the <br> from generating if I removed all whitespace between the end of label and the beginning of input or option:

    </label><input>

    • This topic was modified 5 years, 8 months ago by rcdncn.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Is it possible this is being added via a css pseudoclass?

    Thread Starter rcdncn

    (@rcdncn)

    **SOLUTION**

    I disabled my functions.php and the issue went away. I has added the following code

    remove_filter( 'the_content', 'wpautop' );
    add_filter( 'the_content', 'wpautop' , 99);

    per http://www.mstoicthemes.com/disable-wpautop-shortcodes/ in order to try to eliminate an issue I was having with extra line breaks appearing in a shortcode a plugin was generating.

    It seems moving wpautop that late made it add <br /> between fields in my registration plugin.

    Eliminating the wpautop filter delay fixed my problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘extra linebreak appearing on php output’ is closed to new replies.