Pro blocks

Ajax SearchPro

How to choose which post types are searched, which details appear in the live results dropdown (title, excerpt, featured image, product price), and how to style the search field, button, and results.

This feature needs the Pro version of WPMozo Blocks and Addons.

On this page

See the Ajax Search block live on the demo site (opens in a new tab)

Adding the block#

  1. Click the “+” (Block Inserter) button. You can also use the Site Editor to place it in your header.
  2. Search for “Ajax Search” and select it.
  3. Choose what to search and what to show in the results.

Settings overview#

TabWhat you control there
GeneralPlaceholder, number of results, sources, and displayed fields
DesignSearch field, icon, loader, and result styles
AdvancedSee Common Advanced Settings

General tab#

Configuration#

Configuration settings
SettingDescription
Search Field PlaceholderHint text inside the empty field, for example “Search products…”.
Search Result NumberHow many results to show. Enter -1 to show all.
Order byDate, Modified Date, Title, Slug, ID, or Random.
OrderDESC or ASC.
No Result TextMessage shown when nothing matches.

Search Area#

Search Area settings
SettingDescription
Search InWhere to look for the search term: Title, Content, and/or Excerpt.
Post TypesWhich content to search: Posts, Pages, Products, WPMozo custom types, or All of the above.
Exclude Protected PostsLeaves password-protected posts out of the results.

Display#

Display settings
SettingDescription
Show Search IconShows a magnifying-glass icon in the field.
Display FieldsWhat each result shows: Title, Excerpt, Featured Image, Product Price.
Number Of ColumnsShows results in 1 or more columns.
Show ScrollbarAdds a scrollbar when the list is taller than the dropdown.
Result Item Link TargetOpens results in the Same Window or a New Window.

Design tab#

Search Field#

Search Field settings
SettingDescription
Search Field ColorsBackground, text, and placeholder colors.
Search Field Focus ColorsColors while the visitor is typing.
Search Field DimensionsPadding inside the field.
Field Text AlignmentLeft, center, or right.
TypographyFont settings for the typed text.
Search Field BorderBorder and radius.

Search Icon · Loader#

Search Icon settings
  • Search Icon: Font Size (px) and Color.
  • Loader: Loader Size (px) and Loader Color of the spinner shown while results load.

Result styles#

Search Result Item settings
PanelWhat it controls
Search Result Item TitleTitle color and typography.
Search Result Item ExcerptExcerpt color and typography.
No Result TextAlignment, color, and typography of the “no results” message.
Featured ImageImage Width (px), Height (px), border, and radius.
Search Result ItemBackground (normal and hover), border, and radius of each result.
Search Result BoxBackground, padding, border, and radius of the whole dropdown.

Advanced tab#

See Common Advanced Settings.

Tips#

  • For a store, set Post Types → Products and turn on Featured Image and Product Price.
  • Search Title only for the fastest and most relevant results on large sites.

Was this article helpful?

Updated Nov 2, 2026