BR tag added before Search text

[ad_1]

Hi,

It usually happens when the container element (where the shortcode is placed) is of a Text type and not a HTML or shortcode widget.

Check the container element/widget/module type and make sure to change it to HTML or shortcode.

All the best,
Ernest M.

Thanks, it’s placed in the WP core Shortcode block, so I don’t see any reason for this BR
Unless somebody has a better solution, I’ll try to remove with a javascript

<div class="wp-block-group"><!-- wp:shortcode -->[wpdreams_ajaxsearchlite]<!-- /wp:shortcode --></div>

Can you try a HTML block instead? Maybe that will do the trick. I suspect the shortcode block runs a wpautop as it may thinks it’s a text output(?), not sure.

You can do a custom CSS too, but it would be better to figure out why it’s rendered to a line break.

.asl_w br {
    display: none;
}

All the best,
Ernest

Thanks, I placed directly the [wpdreams_ajaxsearchlite] in the core HTML block and it works fine 🙂

For info, when using the core Shortcode block there is not just one BR but many ! :

<form role="search" action="#" autocomplete="off" aria-label="Search form"><br>
<input aria-label="Search input" type="search" class="orig" tabindex="0" name="phrase" placeholder="Rechercher.." value="" autocomplete="off"><br>
<input aria-label="Search autocomplete" type="text" class="autocomplete" tabindex="-1" name="phrase" value="" autocomplete="off" disabled=""><br>
<input type="submit" value="Start search" style="width:0; height: 0; visibility: hidden;"><br>
</form>

Thanks to you!
( and again : Amazing plugin! )

Thanks 🙂 I will mark this as resolved then.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer