This article shows you how to add custom search functionality to your WordPress website.
Method 1: Using WordPress Built-in Search Widget
WordPress includes a basic search widget that you can add to any widget area like your sidebar or footer.
- Log into your WordPress admin dashboard
- Go to Appearance > Widgets in the left menu
- Find the Search widget in the list of available widgets
- Drag it to your desired widget area (like Primary Sidebar or Footer)
- Click Save to apply the changes
Your search box will now appear on your website. Visitors can type keywords and search through your posts and pages.
Method 2: Adding Search to Your Menus
You can also add a search box directly to your navigation menu.
- In your WordPress admin, go to Appearance > Menus
- Select the menu you want to edit (usually your main menu)
- Look for Screen Options at the top of the page and click it
- Tick the box next to Search to enable search menu items
- You'll now see a Search section in the left column
- Click Add to Menu next to the search option
- Click Save Menu
For more details on working with WordPress menus, see creating WordPress menus.
Method 3: Using Search Plugins for Better Results
WordPress's default search only looks at post titles and content. For better search results, consider installing a search plugin.
- Go to Plugins > Add New in your WordPress admin
- Search for "SearchWP" or "Relevanssi" - these are popular search plugins
- Click Install Now next to your chosen plugin
- Click Activate once installed
- Follow the plugin's setup wizard to configure your search settings
These plugins can search through custom fields, file attachments, and provide more relevant results.
Method 4: Adding Search to Specific Pages
You can add a search box to any page or post using WordPress blocks.
- Edit the page where you want to add search
- Click the + button to add a new block
- Type "search" in the block search box
- Select the Search block
- Customise the placeholder text and button text if needed
- Click Update or Publish to save your changes
This method is useful for creating landing pages or FAQ pages where visitors might want to search for specific information.
Customising Your Search Results Page
WordPress automatically creates a search results page, but you can customise how it looks by editing your theme's search.php file or using the WordPress Customiser.
- Go to Appearance > Customize
- Look for options related to search or archive pages
- Adjust the layout, colours, and content as needed
- Click Publish to save your changes
If you're still stuck with adding search functionality to your website, contact Web60 support through your account portal and we'll help you get it working properly.
FAQ
Q: Why isn't my WordPress search finding all my content?
A: WordPress's default search only looks through post titles and content, not custom fields or file attachments. Installing a search plugin like SearchWP or Relevanssi will give you better, more comprehensive results.
Q: Can I change what the search box looks like?
A: Yes, you can customise the search box appearance through your WordPress theme customiser or by adding custom CSS styling. Most themes also include search styling options.
Q: How do I exclude certain pages from search results?
A: You can exclude pages from search results using a search plugin's settings, or by editing individual pages and setting them to "noindex" in an SEO plugin like Yoast or RankMath.
Q: My search box disappeared after updating my theme - what happened?
A: Theme updates can reset widget areas. Go to Appearance > Widgets and add the search widget back to your sidebar or footer area where you want it to appear.
Q: Can I add search to my mobile menu?
A: Yes, most modern WordPress themes include search in mobile menus automatically. If yours doesn't, you can add it through Appearance > Menus by following the menu search instructions above.
Q: How do I make search results show excerpts instead of full content?
A: This is controlled by your theme settings. Go to Appearance > Customize and look for blog or archive settings, or check your theme's documentation for search result display options.
Last updated: 1 March 2026