Place the search in your theme
PXL Search works best where shoppers already search. In most themes it takes over the existing search with no extra work. When it can't, pick one of the methods below.
Which method should I use?#
| Your theme has | Use |
|---|---|
| A search box or search icon | Take over your theme's search. It is on by default. |
| A menu, but no search | A menu link to #pxl-search |
| A block theme (site editor) | The PXL Search block in the header |
| Widget areas | The PXL Search widget |
| A page builder | data-pxl-search or [pxl_search] |
| Its own search field you want to keep | The navbar field |
| No search anywhere on the page | A theme with no visible search bar |
Take over your theme's search#
With Take over my theme's search on, shoppers type in your theme's search box as usual and pressing Enter opens PXL Search with what they typed. Your theme's search icon opens it too. Your theme keeps its own look.
It recognises a search by what it does, not by theme name: a search form, a search box, or an icon that opens a search panel. It gets there before the theme's own live-search dropdown starts.
Turn on Also swap the theme's search box for the PXL Search bar to replace the form itself with the PXL Search bar, which types example searches by itself. Leave it off if your theme draws its search inside its own panel or menu.
If your theme's search button doesn't open PXL Search, list it under Also open it from, as CSS selectors: .my-search-button, #header-search.

- 1In the WordPress sidebar, open PXL Search and click Settings.
- 2Click the Appearance tab.

The switch at the end of the Take over my theme's search row should be blue (on). It is on for new installs.

Type your theme's selector in Also open it from, for example .header-search-toggle, then click Save changes at the bottom of the page.
Any element: data-pxl-search#
Add the attribute data-pxl-search to any element, in any theme or page builder. Its value is ignored.
<button data-pxl-search>Search</button> <img src="search.svg" alt="Search" data-pxl-search>
- On a button, image, menu item or div, a click opens the search. Elements that aren't buttons get keyboard access and open with Enter or Space.
- On a search field, shoppers type in it and Enter opens the answers for what they typed.
A link to #pxl-search#
Every theme has menus. Go to Appearance›Menus (or your theme's header menu), add a Custom Link with the URL #pxl-search, and name it Search. The link keeps your menu's own look. A full address ending in #pxl-search works too, and so does a button in a page builder.

- 1Open Custom Links and type
#pxl-searchin URL. - 2Type
Searchin Link Text, then click Add to Menu and Save Menu.
The [pxl_search] shortcode#
[pxl_search] [pxl_search style="icon-text" label="Find a gift"] [pxl_search style="bar" placeholder="Search or ask anything"]
| Option | Values |
|---|---|
style | bar, icon or icon-text. Default: your Appearance setting. |
label | Text next to the icon, up to 24 characters. Screen readers read it for every style. |
placeholder | Text in the bar between typed examples, up to 60 characters. |

- 1Add a Shortcode block and type the shortcode in it.
The PXL Search block and widget#
In the block editor or the site editor's header, add the PXL Search block. It has the same options as the shortcode. In a classic theme, add the PXL Search widget to any widget area under Appearance›Widgets; it has style and text options.

- 1Click the + (Block Inserter).
- 2Search for PXL Search and click the block. It has the same options as the shortcode.

- 1Find PXL Search in the list. Drag it into a widget area, or click it and pick the area.
The navbar field#
To keep a search field in your own header markup, mark the field. Shoppers type in it and press Enter to open the answers. Until they do, example searches type themselves into its placeholder.
<form role="search" class="site-search"> <input type="search" data-pxl-search placeholder="Search or ask anything" aria-label="Search"> <kbd>⌘K</kbd> </form>
⌘ K (Ctrl K on Windows) opens the search on any page where it is placed. If your theme already uses that key for its own search box, PXL Search leaves it alone: the key focuses that box, and Enter opens PXL Search. The <kbd> is only a hint for your shoppers and is optional. The full guide to the navbar field.
More ways to fit it in#
- A theme with no visible search bar: why nothing shows, and three fixes.
- Page signals for themes: let your theme react when the search is open.
- When PXL Search is off: what shoppers get instead.