Khoji on WordPress
WordPress powers most of the sites Khoji was built for. Every modern WordPress install already generates a sitemap at /wp-sitemap.xml, so setup takes two minutes. Three ways to do it, easiest first.
Option 0 — The plugin (easiest)
Download khoji-search.zip, then in your admin go to Plugins → Add New → Upload Plugin, upload the zip and activate. Done — press Ctrl+K. Settings (accent color, license key, hiding the floating button) live under Settings → Khoji Search. A WordPress.org directory listing is coming; until then the zip is the official channel.
Option 1 — Site editor / theme customizer (no code)
- Go to Appearance → Theme File Editor (or your theme's "Custom HTML / Footer scripts" box — most themes like Astra, GeneratePress and Kadence have one).
- Paste this before
</body>:
<script src="https://khoji.aiskillhub.info/widget/khoji.js"
data-khoji data-sitemap="/wp-sitemap.xml" async></script>Option 2 — functions.php (survives theme updates in a child theme)
add_action('wp_footer', function () { ?>
<script src="https://khoji.aiskillhub.info/widget/khoji.js"
data-khoji data-sitemap="/wp-sitemap.xml" async></script>
<?php });Option 3 — a header/footer plugin
If you already use WPCode, "Insert Headers and Footers", or similar, add the same snippet as a footer script. A dedicated Khoji WordPress plugin (one-click install from the plugin directory) is in progress.
Replacing the default WordPress search
Hide Khoji's floating button and wire your theme's existing search icon instead:
<script src="https://khoji.aiskillhub.info/widget/khoji.js"
data-khoji data-no-button="true"
data-sitemap="/wp-sitemap.xml" async></script>
<script>
document.addEventListener('click', function (e) {
if (e.target.closest('.search-toggle, .wp-block-search__button')) {
e.preventDefault();
window.Khoji.open();
}
});
</script>Notes for WooCommerce stores
- Product pages are indexed like any other page — descriptions, specs and FAQs become searchable by meaning ("shoes for monsoon" finds your waterproof range).
- Stay under your plan's page cap: exclude tag archives and paginated lists from the sitemap if your catalog is large.
- Prices shown in search snippets reflect page content at index time; the visitor sees live prices on click-through.