Help Search Block

tibi/help-search renders the Help search input. It can show autocomplete suggestions from tibi-help and tibi-faq, then send users to the Help landing search results.

Last modified: July 9, 2026

link Summary

Item Value
Block name tibi/help-search
Editor title Help Search
Category widgets
REST endpoint GET /wp-json/tibi/v1/help-search
Block source packages/wordpress/plugins/tibi-block-library/src/help-search/
Result template logic packages/wordpress/themes/tibi/inc/templating.php

link Editor Usage

Use this block on Help surfaces where users should search help articles and FAQs. The default destination is /hjelp/.

Attribute Default Purpose
enableDropdown true Enables autocomplete suggestions.
placeholder Søk i hjelpesider... Input placeholder.
ariaLabel Søk i hjelpesider Accessible input label.
redirectUrl /hjelp/ Search results destination.
queryParam s Query parameter for the search term.

link Autocomplete Flow

The frontend view script reads block config from data-config and fetches:

GET /wp-json/tibi/v1/help-search?q={term}&per_page={number}

The endpoint searches:

Returned items include:

The WordPress query sets use_algolia => true, so Algolia can power matching/order when available.

link Help Result Page Behavior

When a Help landing page request includes ?s=, theme code converts the request into a real search query limited to:

It also preserves help-category filters and uses query-string pagination so the Help landing route does not produce broken /page/2/ URLs.

link Accessibility Notes

When dropdown is enabled, the input is rendered as a combobox with:

The frontend supports keyboard navigation, Enter selection, Escape close, reset button behavior, and outside-click close.

link QA Checklist

link When To Ask A Developer

Ask a developer before changing the endpoint, result item shape, query parameter, Algolia behavior, or Help landing template behavior.