Advanced module

Advanced Search block

A search box with post type and taxonomy filters, and live results as you type.

Overview

Advanced Search is a search field that can search only certain content types, add filter dropdowns (for example Category and Tag), and show live results while visitors type. Pressing Enter goes to your normal WordPress search results page with the filters applied.

At a glance

Block name
wpbb/advanced-search
Module
Advanced
Find it by searching
Advanced Search
Loads JavaScript on the site
Yes, a small script, only on pages that use this block (it powers the live results)

When and why to use it

  • Knowledge bases and documentation sites.
  • Blogs with many categories.
  • Header search with instant suggestions.

Example scenarios

  • Help centre: search in “Docs” only, a “Topic” taxonomy dropdown, live results with 6 suggestions.

How to add the Advanced Search block

  1. Open the editor. In your WordPress dashboard go to Pages (or Posts) and click the page you want to edit, or click Add New. For headers, footers and templates, use Appearance → Editor (block themes).
  2. Add a new block. Click the blue + (Block Inserter) button in the top-left corner, or the small + that appears where you want the block. You can also type / on an empty line.
  3. Search for the block. Type Advanced Search in the search field. Brigade Blocks appear in the Brigade Blocks category and show the coral block icon.
  4. Insert it. Click Advanced Search in the results. The block appears with a search field with an icon button.
  5. Configure the content. Edit the text directly on the block, then open the Settings tab (gear icon) in the right-hand sidebar for the options described below. If the sidebar is hidden, click the gear icon in the top-right corner.
  6. Customise the design. Switch to the Styles tab (half-filled circle icon) to change colours, spacing, borders and more — see Design & styling.
  7. Save or publish. Click Save draft to keep working later, Preview to check it, or Publish / Update to make it live.

Content settings

You set up this block in two places: on the block itself in the editor, and in the Settings tab (gear icon) of the sidebar on the right. Every option is listed below, with its default value.

Search in

What it does
Limits the search to these content types.
What to enter or choose
Tick the searchable post types.
Default
None selected
How to use it
Tick every option you want.
When to use it
To exclude pages or products.
Example
Posts and Docs.
Result
None checked searches everything visitors can search.

Let visitors pick the content type

What it does
Adds a content-type dropdown.
What to enter or choose
On or off.
Default
Off
How to use it
Click the switch to turn it on (blue) or off.
When to use it
With several types.
Example
On for mixed sites.
Result
Visitors can narrow the search.

Filter dropdowns (up to 3)

What it does
Adds a dropdown per taxonomy.
What to enter or choose
Tick up to three public taxonomies.
Default
None selected
How to use it
Tick every option you want.
When to use it
For large sites.
Example
Categories and Tags.
Result
Results are limited to the chosen terms.

Settings panel: Live results

Show results while typing

What it does
Shows suggestions under the field as visitors type (from 2 characters).
What to enter or choose
On or off.
Default
On
How to use it
Click the switch to turn it on (blue) or off.
When to use it
Usually.
Example
On.
Result
A dropdown of matching posts.

Number of resultsShown when Live results are on

What it does
How many suggestions.
What to enter or choose
A number from 1 to 10.
Default
6
How to use it
Drag the slider, or type a number in the box next to it.
When to use it
Always optional.
Example
6.
Result
More or fewer suggestions.

ThumbnailsShown when Live results are on

What it does
Shows featured images in suggestions.
What to enter or choose
On or off.
Default
On
How to use it
Click the switch to turn it on (blue) or off.
When to use it
Visual content.
Example
On.
Result
Small images beside results.

Settings panel: Appearance

Placeholder

What it does
Hint inside the field.
What to enter or choose
Text, or empty for “Search…”.
Default
Empty
How to use it
Type into the text field. Changes appear in the preview right away.
When to use it
Optional.
Example
“Search the help centre…”.
Result
Shown in the empty field.

Button

What it does
Icon or text button.
What to enter or choose
One of: Icon, Text.
Default
Icon
How to use it
Open the dropdown and pick an option.
When to use it
Always optional.
Example
Icon.
Result
The button changes.

Button text

What it does
The text of a Text button (or the accessible name of the icon button).
What to enter or choose
Text, or empty for “Search”.
Default
Empty
How to use it
Type into the text field. Changes appear in the preview right away.
When to use it
Optional.
Example
“Find”.
Result
—

Shape

What it does
Corner style.
What to enter or choose
One of: Rounded, Pill, Square.
Default
Rounded
How to use it
Open the dropdown and pick an option.
When to use it
Match your buttons.
Example
Pill.
Result
The field changes shape.

Design & styling

Select the block, open the Styles tab in the settings sidebar (the half-filled circle icon next to the gear) and use the three pickers at the top of the Style panel:

  1. Element — which part of the block to style.
  2. State — Normal, or a state such as Hover (only the states the part supports are offered).
  3. Device — Desktop, Tablet or Mobile, for values that can differ per screen size.

Only panels that make sense for the chosen part and state are shown. The full meaning of every control is in the Styling Controls guide; below is exactly what Advanced Search offers.

Element: Field selected first

The field. Focus state (while typing).

Styles-tab controls for “Field”
PanelControlPer deviceAvailable in states
TypographyFont family—Normal
Font sizeYesNormal
Weight—Normal
Style—Normal
Line heightYesNormal
Letter spacingYesNormal
Letter case—Normal
AlignmentYesNormal
Decoration—Normal, Focus
ColorsText—Normal, Focus
BackgroundType—Normal, Focus
Color / Gradient—Normal, Focus
Image—Normal
BorderBorder type—Normal, Focus
Border—Normal, Focus
RadiusYesNormal
Focus indicator—Focus
Box ShadowRemove shadow—Normal, Focus
Shadow layers—Normal, Focus
SpacingPaddingYesNormal
SizingWidthYesNormal
Max widthYesNormal
HeightYesNormal
Min width / Min height / Max heightYesNormal
EffectsOpacity (%)YesNormal, Focus

States for this part:

  • Focus — While the visitor is typing in it (the field inside has keyboard focus).

Element: Block

The wrapper.

Styles-tab controls for “Block”
PanelControlPer deviceAvailable in states
BackgroundType—Normal
Color / Gradient—Normal
Image—Normal
BorderBorder type—Normal
Border—Normal
RadiusYesNormal
Box ShadowRemove shadow—Normal
Shadow layers—Normal
SpacingMarginYesNormal
PaddingYesNormal
SizingWidthYesNormal
Max widthYesNormal
HeightYesNormal
Min width / Min height / Max heightYesNormal
Block alignmentYesNormal
PositionPositionYesNormal
Top / Right / Bottom / LeftYesNormal
Z-indexYesNormal
OverflowYesNormal
TransformMove X / Move Y—Normal
Scale X / Scale Y—Normal
Rotate (°), Rotate X (°), Rotate Y (°)—Normal
Skew X (°) / Skew Y (°)—Normal
EffectsOpacity (%)YesNormal
State transition (ms)—Normal
Timing—Normal
VisibilityShow on Desktop / Tablet / Mobile—Normal

States: Normal only.

Element: Button

The button. Hover and Focus.

Styles-tab controls for “Button”
PanelControlPer deviceAvailable in states
TypographyFont family—Normal
Font sizeYesNormal
Weight—Normal
Style—Normal
Line heightYesNormal
Letter spacingYesNormal
Letter case—Normal
AlignmentYesNormal
Decoration—Normal, Hover, Focus
ColorsText—Normal, Hover, Focus
BackgroundType—Normal, Hover, Focus
Color / Gradient—Normal, Hover, Focus
Image—Normal
BorderBorder type—Normal, Hover, Focus
Border—Normal, Hover, Focus
RadiusYesNormal
Focus indicator—Focus
Box ShadowRemove shadow—Normal, Hover, Focus
Shadow layers—Normal, Hover, Focus
SpacingPaddingYesNormal
SizingWidthYesNormal
Max widthYesNormal
HeightYesNormal
Min width / Min height / Max heightYesNormal
EffectsOpacity (%)YesNormal, Hover, Focus

States for this part:

  • Hover — When the mouse pointer is over it. (Touch screens have no hover; they show the normal style.)
  • Focus — When it has keyboard focus — reached with the Tab key. Mouse clicks usually do not show focus styles.

Element: Live results

The live results dropdown.

Styles-tab controls for “Live results”
PanelControlPer deviceAvailable in states
BackgroundType—Normal
Color / Gradient—Normal
Image—Normal
BorderBorder type—Normal
Border—Normal
RadiusYesNormal
Box ShadowRemove shadow—Normal
Shadow layers—Normal
SpacingPaddingYesNormal
SizingWidthYesNormal
Max widthYesNormal
HeightYesNormal
Min width / Min height / Max heightYesNormal
EffectsOpacity (%)YesNormal

States: Normal only.

Responsive settings

Brigade Blocks uses three screen sizes: Desktop (wider than 1023px), Tablet (600–1023px) and Mobile (599px and narrower). Tablet and Mobile values are optional: when empty, the value of the next larger screen is used.

In the Styles tab, pick the Device first; these controls can then have a different value for that screen size: Font size, Line height, Letter spacing, Alignment, Radius, Padding, Width, Max width, Height, Min width / Min height / Max height, Opacity (%), Margin, Block alignment, Position, Top / Right / Bottom / Left, Z-index, Overflow.

The Visibility panel (Styles tab, Normal state) can hide the block entirely on Desktop, Tablet or Mobile.

Advanced options

  • HTML anchor (Advanced section of the Settings tab) — a unique name such as pricing, so you can link straight to this block with #pricing at the end of the page address (for example from a menu).
  • Additional CSS class(es) (Advanced section) — for custom CSS from your theme or the Site Editor. Separate several classes with spaces.
  • Custom attributes (Advanced section) — add data-*, title, aria-label, aria-describedby, lang or dir attributes. See Custom attributes.
  • State transition (Styles tab → Effects, Normal state) — how smoothly hover and focus styles animate.
  • Width alignment (block toolbar) — Wide width, Full width, when your theme supports them.

How it works on your site

A normal search form (works without JavaScript). Live results come from a public, read-only REST endpoint that returns only what the site’s own search shows visitors: published, non-password-protected posts of public, searchable post types.

Accessibility

  • Live results follow the combobox pattern: ↓/↑ move through suggestions, Enter opens one, Esc closes the list.
  • The number of results is announced to screen readers.

Limitations and notes

  • Up to three filter dropdowns and 10 live results.
  • Live results start from 2 characters.