Search Bar

The search bar is one of the most important aspects of a knowledge base. It helps users find the right information, quickly.
As known WordPress comes with a search bar that is very limited and not adapt for a KB.
For this reason BasePress has a search feature of its own. It mainly filters the results according to the KB you visit, language when used with WPML and BasePress content restriction.

BasePress search bar.

The BasePress search bar features an optimized algorithm to find the most relevant articles according to the search terms used. This includes the capacity to look for articles that contain any of the search terms and assigning a score to the found articles.
The score is based on where the search terms are found in the article, how many visits the article receives along with user votes. BasePress sorts the search results according to these criteria. Then the results are displayed live with a snippet of where the terms are found in the article’s content.

Many search bars only find results if they find all of the search terms in the content. WordPress standard search bar is no exception. This means that if the user types two or more terms, articles that contain only one of those terms won’t be found. Therefore remaining hidden to the users.
The BasePress search algorithm will find any combination of terms present, highly increasing the chances to find a useful article for the user.

The number of results shown in the live suggestions can be limited from the plugin settings page. In this way we only show the best matches to our users and also reduce the time needed to fetch results.
Read more on the search bar settings.

At this point the user can  select an article from the ones suggested or run a full search. When running a full search, a new page appears where you see a list of the found articles.

Search results screen.

The search bar can appear with or without the submit button. You can trigger the full search by pressing enter or clicking on the ‘View all’ button at the bottom. It’s possible to replace the plus sign with some text e.g. ‘View all Results’ from the plugin settings page.

Some other unique features of the BasePress search bar:

  • You can add the search bar to any page of your website if you need to retrieve information from your KB; using the dedicated Gutenberg block or by using this shortcode: [ basepress-search kb=”knowledgebase-slug” with=”600px”].
  • You can either use it to run a search in all of your KBs or for an individual KB search. It’s a powerful tool when you have a multiple KB.

Was this helpful?