{"id":182,"date":"2004-09-24T16:45:31","date_gmt":"2004-09-24T15:45:31","guid":{"rendered":"http:\/\/wp.devco.net\/?p=182"},"modified":"2009-10-09T17:15:23","modified_gmt":"2009-10-09T16:15:23","slug":"search_term_highlighting","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2004\/09\/24\/search_term_highlighting.php","title":{"rendered":"Search term highlighting"},"content":{"rendered":"
I am trying out a Google search term highlighter on my page. I noticed a lot of people coming to my server and finding category or date based indexes for their searches. They then go and use the Google Cache<\/a> to come and view the page that does the search item highlighting in order to find the specific bit they are interested in. I am trying out a Google search term highlighter on my page. I noticed a lot of people coming to my server and finding category or date based indexes for their searches. They then go and use the Google Cache to come and view the page that does the search item highlighting in order to […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[5],"tags":[52],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/182"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":1,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":758,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/182\/revisions\/758"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\nTo help those poor people find things easier I figured I will try highlighting all search referrals. I tried a PHP script that can do this for many search engines but I think it had issues with my existing PHP code on the site, now I am using a Javascript tool called Google Highlighter<\/a>. It is only for Google<\/a> searches but that is fine since that is the most used search engine these days.
\nTo see how it works use the search box on my site to search for something, like “devco”, and click on one of the results you will see your terms highlighted in colors similar to those used by Google.
\nI think it may actually be best to only put it on pages where confusion is most likely, the front page and date based pages. The assumption is that if you get to a individual entry page it will be fairly obvious quickly if it applies to you or not.<\/p>\n","protected":false},"excerpt":{"rendered":"