Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can add search to a WordPress menu either by placing a Search block in a block theme’s header, using a classic theme’s header widget area, or linking the menu to a dedicated Search page. First check which theme type is active: the editing route and available placements depend on your theme.

Choose the route that fits your theme

What you want Best starting point What to check
An inline search field in the header Block theme: Appearance > Editor. Classic theme: check its header settings or widget areas. Whether the editor and theme support the placement you want; preview desktop and mobile.
A simple menu destination for search Create a Search page with a Search block, then link to it from the menu. Confirm the page is published and the menu link points to it.
A custom theme implementation Use the Search block in a block-theme template, or get_search_form() in a classic theme. Use a child theme or controlled development workflow to avoid losing parent-theme edits during updates.

WordPress interface labels and theme capabilities vary. If a menu or editor option below is absent, check the active theme’s documentation and the current dashboard rather than assuming your site is misconfigured.

Add search to a block theme’s navigation area

Block themes use the Site Editor to edit templates and template parts, including the header. The Navigation block manages menu links; the Search block provides the search form. WordPress documentation describes the Search block as a way to “place a search widget on your page or post.” WordPress Search block documentation

  1. In the dashboard, open Appearance > Editor. Open the header template part, or the template part that contains your site navigation. Site Editor navigation is available when a block theme is active. WordPress Site Editor navigation documentation
  2. Select the Navigation block. To add search, use the editor inserter to add a Search block in the header or navigation layout, where the theme’s layout permits it. WordPress Navigation block documentation
  3. Select the Search block and configure its label, placeholder, and button. Depending on the block settings, the button can appear outside or inside the field, be omitted, or appear as a button only; its appearance can use text or an icon. Adjust width, color, typography, border, padding, and margin to fit the header. WordPress Search block documentation
  4. Save the Site Editor changes, then preview the site at desktop and mobile widths. Check that the field or button remains visible and usable when the navigation changes layout.

Add search with a classic theme

Classic themes may provide Appearance > Menus, header settings, or widget areas. The classic Menus screen may also remain available for hybrid themes or through plugins that enable it; WordPress 6.0 and later use the Navigation block for block themes. WordPress Appearance Menus Screen documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check for a header widget area

Widget areas are defined by the theme and may appear in a sidebar, footer, or another location. A header widget area is not guaranteed. If your theme provides one, add the Search widget or block there and adjust its styling to work alongside the menu. WordPress lists Search among its standard widget examples; the current widget editor can also support blocks. WordPress widget documentation WordPress block-based Widgets Editor documentation

If the theme has no suitable header area

Use a Search page linked from the menu, or consider a theme-specific or plugin-based option after checking compatibility with your active theme. The official WordPress documentation establishes that theme features vary; it does not identify a particular third-party plugin as necessary for this task.

Use a Search page instead of an inline field

A dedicated page is a practical alternative when an input field will not fit your navigation. WordPress documents this approach: create a page titled Search, insert a Search block, publish the page, and add its link to the menu. Searches submitted from the page display results on that same page. WordPress guide to creating a search page

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Developer options for theme code

Classic themes: get_search_form()

In a classic theme, get_search_form() displays a search form. WordPress looks for searchform.php in the child theme or parent theme before falling back to its default form, and the output can be modified with the get_search_form filter. WordPress Developer Resources: get_search_form()

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Block themes: Search block markup

WordPress’s Theme Handbook shows Search block markup for template files, for example <!-- wp:search {"label":"Search","buttonText":"Search"} /-->. This is an integration point, not a universal header recipe: the right location depends on the theme’s template structure. Use a child theme or a controlled theme-development workflow so parent-theme updates do not overwrite your changes. WordPress Developer Resources: Template Files

Before publishing, check the result

  • Confirm you edited the active theme’s header or menu area.
  • Make sure the search label or button is clear and usable, particularly if you choose an icon-only button.
  • Preview desktop and mobile layouts; the theme determines how the header and navigation adapt.
  • If you created a Search page, verify it is published and reachable from the menu.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.