• Resolved charlie67p

    (@charlie67p)


    Hello!

    I can’t get rid of this BR tag, that is automatically added before the “Search..” text, do you know from where it could come ?
    Thank you

    <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">
    • This topic was modified 9 months, 3 weeks ago by charlie67p.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author wpdreams

    (@wpdreams)

    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.

    Thread Starter charlie67p

    (@charlie67p)

    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>
    Plugin Author wpdreams

    (@wpdreams)

    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

    Thread Starter charlie67p

    (@charlie67p)

    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>
    Plugin Author wpdreams

    (@wpdreams)

    Thanks for the info!

    All the best,
    Ernest

    Thread Starter charlie67p

    (@charlie67p)

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

    Plugin Author wpdreams

    (@wpdreams)

    Thanks ?? I will mark this as resolved then.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘BR tag added before Search text’ is closed to new replies.