Widgets

Search Widget

Published · Last updated

To add the Super Speedy Search Widget to your theme, go to Dashboard > Appearance > Widgets and drag the Super Speedy Search widget over to your widget area. Mine will be going in the Shop Sidebar, on the Woodmart theme. If your theme has no widget area where you want the search box (for example your site header), see how to add the Super Speedy Search widget into your header.

[](https://staging.superspeedyplugins.com/assets/sss-widget-1-4.png)

Configuring the Super Speedy Search Widget

Now, you can name it and give it a placeholder text. I will name mine Super Speedy Search and put SSS as the placeholder for this example (typically you’d add ‘Search’ or something helpful in here). I will also change the search button from ‘GO’ to ‘GO NOW’.

[](https://staging.superspeedyplugins.com/assets/sss-44-1-4.png)[](https://staging.superspeedyplugins.com/assets/sss-46-1-4.png)

If you leave the search button text empty, we’ll display a magnifying glass icon to represent the search button.

Different post types

Selecting post types within the widget allows you to decide what exactly is searched for in the ajax dropdown of one specific widget as opposed to your site-wide search. Like this, you can have differently configured search widgets on different pages.

[](https://staging.superspeedyplugins.com/assets/sss-47-1-4.png)

Best for
  • A products-only search box in the shop sidebar and a posts-only box on the blog
  • A knowledge-base search on your docs pages that ignores products entirely
  • A single site-wide box that searches everything at once

Default post type when user hits enter or search

Search all post types or specify which default post type will display on the search result page after the search is completed.

[](https://staging.superspeedyplugins.com/assets/sss-widget-default-pos-type-1-4.png)

Exclude Taxonomies/IDs

Exclude any taxonomies or term IDs from the search results by adding them to these boxes.

[](https://staging.superspeedyplugins.com/assets/sss-widget-exclude-1-4.png)

Note

These exclusions apply to this widget only. They are handy for keeping a category (or a few specific products) out of one search box without touching your site-wide search settings.

Restrict to Taxonomy (5.58 and later)

The opposite of the exclusion table. Enter a taxonomy and one or more term IDs and this search box will only ever return items in those terms, instead of everything except them.

Child terms are included automatically, so restricting to a parent category also finds items filed under its children. The restriction applies to the ajax dropdown as well as the full results page.

The shortcode equivalent is include_<taxonomy>:

[superspeedysearch include_product_cat="42"]
Best for
  • A search box in a category sidebar that only searches that category
  • A documentation box on a product’s own support page
  • A brand-specific box on a brand landing page
Note

This replaces the old tax and taxslugs shortcode parameters, which were removed in 5.58. They had stopped having any effect, so a box using them was quietly searching the whole site. If you have tax="product_cat" taxslugs="dogs" anywhere, swap it for include_product_cat with the term ID.

Search what?

Controls where the search box sends the visitor when they hit enter, and what its dropdown searches.

SettingWhat it does
EverythingSearches the whole site. The default.
Current pageSearches the archive the visitor is currently on.
Top categorySearches that archive’s top-level parent.

Top category (added in 5.58) is the one for deep category trees. A search box sitting on Electronics > Audio > Headphones searches all of Electronics rather than just headphones – usually what a visitor wants from a box in a category sidebar. On a single product or post it uses that item’s own category, so “search this section” works from a product page too.

Both scoped options restrict the ajax dropdown as well as the results page, so the suggestions a visitor clicks stay inside the scope.

Note

search_what="current" and search_what="current_product_cat" were documented in an old changelog but never actually worked – a box using them searched the whole site. From 5.58 both behave as Current page.

Show search suggestions dropdown

New in 5.58. Unticking this turns off the suggestion list for this search box only.

This matters on a restricted box. Suggestions are built from every indexed title on the site and cannot be limited to one category, so a box restricted to Electronics would still suggest phrases that lead somewhere else entirely. Turning suggestions off keeps the box honest.

The shortcode equivalent is suggestions="off".

Best for
  • Any box using Restrict to Taxonomy, Current page or Top category
  • A minimal header box where you want results only, with no dropdown

Further reading

place the box in a header that has no widget area
what the search result page shows when the user hits enter
refine results further with taxonomy and attribute filters

Comments

▲
▼
1/1