Hi @alexjackmann,
Thanks for contacting us,
Please share your website URL, we will check then assist you better.
Thanks
hi @imranaliweb
thanks for very fast feedback. http://alexander-jachmann.de
Thanks a lot
Hi @alexjackmann
It’s going to be perfect on our end like I have put it keine keyword in the search box and checked that it’s going to be okay, you can see the screenshot below.
http://prntscr.com/icp2iz
Thanks
hi @imranaliweb
for example i use search box in the footer with the folloing result.
if i us a other Theme like “Twenty Twelve”, the search Result looks like this.
For better search i use the Wordpres Plug-In “Relevanssi”, in the settings you can configure how to highlight result.
Thanks a lot
-
This reply was modified 6 years, 2 months ago by alexjackmann.
Hi @alexjackmann
For this first of all install the Code Snippets plugin, you can install Code Snippets plugin while using this link.
https://wordpress.org/plugins/code-snippets/
Then paste the code given below into the snippets editor and activate snippets.
function busiprof_highlight_results($text){
if(is_search()){
$keys = implode('|', explode(' ', get_search_query()));
$text = preg_replace('/(' . $keys .')/iu', '<span class="search-highlight">\0</span>', $text);
}
return $text;
}
add_filter('the_content', 'busiprof_highlight_results');
add_filter('the_excerpt', 'busiprof_highlight_results');
add_filter('the_title', 'busiprof_highlight_results');
function busiprof_highlight_results_css() {
?>
<style>
.search-highlight { background-color:#FF0; font-weight:bold; }
</style>
<?php
}
add_action('wp_head','busiprof_highlight_results_css');
You can also follow this screenshot
http://prntscr.com/icpmo0
Any confusion lets me know.
Thanks
Hi @imranaliweb
thanks a lot. Very great Job!
-
This reply was modified 6 years, 2 months ago by alexjackmann.
Hi @alexjackmann,
Glad to know it worked for you.
If you get any issue later, feel free to ask again!
We would really appreciate if you could provide us a review here:
https://wordpress.org/support/theme/busiprof/reviews/#new-post
Close this ticket !!!
Thanks