Hello tagDiv support team,
I am using the Newspaper theme (latest version) and experiencing an issue with the live search (header search / instant search / ajax search).
Problem description:
When users type “niger” (for example, searching for the word “Niger” as in the country Niger or the Niger River), the live search immediately starts showing results that contain “Nigeria” (the neighboring country).
This happens because the search appears to use partial substring matching, where “niger” is contained within “Nigeria”. As a result, Nigeria-related posts/pages appear in the dropdown even though the user has only typed 5 letters and likely intends the shorter, different term.
This creates confusion for visitors, especially on websites that cover African geography, news, travel, or similar topics where both “Niger” and “Nigeria” are relevant but distinct.
Examples:
Typing: niger → shows posts about Nigeria
Expected behavior (in my opinion): show only exact or closer matches first, or at least prioritize exact prefix matches (niger*) over substring matches inside longer words.
Questions / feature request:
Is there any setting in Theme Panel → Post Settings / Search Settings / General / Performance to change the live search behavior from substring/contains to starts-with / prefix matching?
If not, can this be customized via a code snippet (e.g., modifying the AJAX search query with a filter/hook)?
Or is there a way to increase the minimum characters required before live search triggers (to reduce false positives on short inputs)?
Would it be possible in a future update to add an option for stricter matching in live search?
I would greatly appreciate any guidance, workaround, or confirmation if this is expected behavior or a possible improvement.
Thank you in advance for your help!
Best regards,
Siby Xavier
Hi,
The live search is based on popular search plugins and displays results that match the typed letters. It starts showing results after you type at least 3 letters.
Unfortunately, there are no options to change this behavior, and it cannot be customized.
As a workaround, we recommend using a dedicated live search plugin. Most of them use shortcodes, so they can be placed anywhere on your site using the tagDiv Composer and the shortcode element.
https://www.wpbeginner.com/showcase/12-wordpress-search-plugins-to-improve-your-site-search/
Can we change search result for normal search
https://trendsnafrica.com/?s=niger showing only niger not nigeria
Hi,
This can be achieved using a dedicated search plugin:
Relevanssi
SearchWP