Highlight Search Terms
Highlights search terms within WordPress generated search results, both on the search results page and on each linked post page itself. This plugin is light weight and has no options. It started as very simple fusion between How to Highlight Search Terms with jQuery – theme hack by Thaya Kareeson and Search Hilite by Ryan Boren. It has since evolved with many optimizations, HTML5 and other plugin compatibility. Since version 1.6 it no longer depends on the jQuery library. Features Click through highlights: Highlights not only on WP search results page but also one click deeper inside a post page Character and case insensitive (lenient) highlighting Caching (WP Super Cache) compatibility Search terms wrapped in double quotes now considered as single term Compatible with: Woocommerce Search Filter Pro BuddyPress bbPress What does it do? This low impact plugin finds all search terms on a search results page inside each post and highlights them with a ... tag. Note that N is a number starting with 0 for the first term used in the search phrase increasing 1 for each additional term used. Any part of a search phrase wrapped in quotes is considered as a single term. What does it NOT do? There are no CSS style rules set for highlighting. You are free to use any styling you wish but to make the highlights visible in browsers that do not support HTML5 like Internet Explorer 8 or older you absolutely need to define at least one rule. Modern HTML5 browsers will use their own highlighting style by default, which usually is a yellow marker style background. So what do I need to do? In most cases, it should just work. But you can do two things to ensure backward browser and theme compatibility: Define CSS rules: There are no configuration options and there is no predefined highlight styling. You are completely free to define any CSS styling rules in your themes main stylesheet (style.css) or the Custom CSS tab if the WordPress theme customizer. You can find basic instructions and CSS examples in the FAQ’s. Check your theme: In most up to date themes (including WP’s own default theme) post and page content is shown inside a div with class hentry. This means search terms found in post and page content will be highlighted but not similar terms that accidentally show in the page header, sidebar or footer. If your current theme does not use the hentry class (yet), this plugin will look for IDs content, main and finally wrapper but if none of those are found, it will not work for you out of the box. See the last of the FAQ’s for ways to make it work. Available hooks and filters hlst_query_vars – The array of WordPress query variables that the plugin will identify as a search query. Must return an array. Default: ['search_terms','bbp_search'] (WordPress abd bbPress search) hlst_input_get_args – An array of GET variables that the plugin will identify as a search query. Must return an array. Default: ['hilite'] (for click-through highlighting) hlst_selectors – The array of possible HTML DOM element identifiers that the script will try. The first viable identifier it finds elements of will be scanned for search terms to mark, the rest is ignored. So the order is important here! Start with the element closest to, but still containing all the post/page title, excerpt or content. hlst_events – The array of DOM event listeners that the inline script will watch for. Default: ['DOMContentLoaded','post-load'] (on Document Ready and for Jetpack Infinite Scroll and others). hlst_inline_script – The inline script that will be added to the plugin script file. Can be used to add to or alter the inline script. Must return a string. Known issues & development If your theme does not wrap the main content section of your pages in a div with class “hentry” or HTML5 article tags, this plugin might not work well for you out of the box. However, you can make it work. See the last of the FAQ’s for an explanation. Josh pointed out a conflict with the ShareThis buttons plugin. Since then, that plugin has been completely rewriten so please let me know if the problem still exists. Thanks! Please file bug reports and code contributions as pull requests on GitHub.
Top keywords
- search17×2.34%
- page9×1.24%
- terms7×0.96%
- theme7×0.96%
- array6×0.83%
- css6×0.83%
- post6×0.83%
- script6×0.83%
- search terms6×0.83%
- content5×0.69%
- default5×0.69%
- highlights5×0.69%
Search Tools – Advanced Search Analytics, Highlight, Extend, Disable
Highlights search term (customizable colours), collects search analytics (privacy friendly), extends default search engine or disable search completely. WP Search Tools, brand new 2024 WordPress plugin, is a collection of useful improvements to the site search functionality if used or not. Search Analytics Do you know what people search for on your website, actually? WordPress core doesn’t store any statistical data, but the WP Search Tools plugin shows detailed insights about the history of searched terms. The Insights is a great analytics tool which tells you what users really look for. No personal data is saved. There are 3 overviews: 1) All Users 2) Logged in 3) Guests (not logged in users) Each overview data is represented by a graph and popularity lists. The graph data can customized and exported either as an image (.svg or .png) or as a .csv file. Most frequent search terms are sorted by a date: ‘today’, ‘last 7 days’, ‘last 30 days’, ‘this year’, ‘overall’. Highlight Search Term In the search results page, the search term is highlighted with a smooth, eye-catching CSS animation. The highlight feature is activated by default. User experience is enhanced and visual mark speeds up finding relevant information. Furthermore, highlight settings are customizable, both background colour and text colour can be set in the WordPress administration options page. Extend Search Free version of the plugin extends the default search engine. It allows searching in custom post types, taxonomies, authors and meta data. All these data of the website are hidden to the basic WordPress search engine and cannot be reached via search functionality. The results are ordered by relevance not post date. The settings can be customized to fit exact needs. It is possible to choose which post types, meta data or taxonomies should be included in the search. Disable Search The plugin prevents WordPress from allowing and handling any search requests from the front-end of the site. If search is not used on the website, it is useful to disable it completely. The seach form is hidden, if called with a standard get_search_form() function, the search requests redirect to a 404 error page. The setting is customizable, you can turn it on/off. Key Features collects search terms what people look for displays graph with recent data highlights search term sorts data according to the users (logged in, guests) and dates highlights the term if it has no results shows basic overview on the Dashboard extends default search engine with post types, meta data, taxonomies, meta data orders search results by relevance settings are customizable disable search Links Website Documentation GitHub repository
Top keywords