In reference to the following Website Baker documentation for enabling Search Term Highlighting
PLEASE NOTE: The information contained below requires you to make a change to a core WebsiteBaker file. As such, upgrading to a new version of WebsiteBaker will result in this fix being overwritten unless the recommended change is incorporated into future versions of WebsiteBaker.
This may have worked back in WB 2.6.7 however, after hours of trying to get this to work, it turns out that this search term highlighting functionality is no longer implemented in the current version of WebsiteBaker. From what I gather, it seems that the search feature used to call the search_highlight
function located in framework/frontend.functions.php
. I am not sure when it happened. however after scanning all of the WebsiteBaker source code, I can no longer find any code in WebsiteBaker that makes a call to this function.
To restore this functionality, you must edit the following line of code which is located in the prepare_excerpts
function of the search/search_modext.php
Was: $EXCERPT_MARKUP_START = '<b>';
Should be changed to: $EXCERPT_MARKUP_START = '<b class="highlight">';
Once you have saved these changes, be sure to follow the instructions mentioned in the above link to correctly configure your CSS.
That's it. From that point on, the words used in search terms will be highlighted according to your CSS style.
Note: If you decide not to implement any customization to your CSS code, the change described above will not have any noticeable effect.OFFICIAL REQUEST: I would like to request that the above fix for restoring the documented functionality be included in future versions of WebsiteBaker.
With warmest regards,