all docs

Install on your site

WordPress

Add the snippet with a header-and-footer plugin. No theme editing.

In your SearchBox dashboard, open Spotlights, pick your spotlight, then Widget → Embed Code, and copy the snippet.

  1. 1Add your website under Widget → Domain Access before you paste the code. The widget won't load on a domain that isn't listed.
  2. 2In WordPress, go to Plugins → Add New and install a code-snippets plugin such as WPCode.
  3. 3Open its Header & Footer settings.
  4. 4Paste the snippet into the Footer box and save.
  5. 5Reload your site. The widget appears on every page.

Using a caching plugin (WP Rocket, LiteSpeed, W3 Total Cache)? Clear the cache after saving. If the plugin delays JavaScript, exclude searchbox-cmdk.js from delay.

Something unclear? Tell us and we’ll fix this page.