Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Placeholder position in search button › Reply To: Placeholder position in search button
January 4, 2023 at 11:28 am
#40738
Keymaster
You are welcome, thank you for the details!
There is still one thing you can try. There is a hook available to modify the plugin HTML output. In theory if that would be minified, then the br/p tags will not be appended.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_filter( 'asp_shortcode_output', 'asp_minify_shortcode_output', 10, 1 );
function asp_minify_shortcode_output( $output ) {
$search = array(
'/\>[^\S ]+/s',
'/[^\S ]+\</s',
'/(\s)+/s',
'/<!--(.|\s)*?-->/'
);
$replace = array(
'>',
'<',
'\\1',
''
);
return preg_replace($search, $replace, $output);
}
If all goes well, the line break will disappear.