A lightweight utility that adds instant search inside taxonomy metaboxes in the WordPress admin editor.
Works with both hierarchical taxonomies (categories-style) and non-hierarchical taxonomies (tags-style) with zero configuration.
- Copy
taxonomy-search.jsinto your theme’s/js/folder. - Copy the contents of
ajax-taxonomy-search.phpfile to yourfunctions.phpor the file where you enqueue scripts. - Open any post editor → taxonomy boxes now include a search field.
- Works with any taxonomy automatically
- Supports:
- Hierarchical UI (categories with checkbox tree)
- Non-hierarchical UI (tags style)
- Instant client-side filtering
- Keeps checked terms visible
- Works with “All / Most Used” tab switch
- No database queries
- No dependencies beyond WordPress core
- Add the JavaScript file
- Place
taxonomy-search.jsinside:
your-theme/js/taxonomy-search.js
- Add the enqueue code
- Paste the PHP snippet into your theme’s
functions.phpor an included file.
- Done
- The search field will appear automatically in all taxonomy metaboxes.
- Open any post, page, or custom post type editor
- Each taxonomy metabox will show a search input
- Typing filters the visible terms instantly
- Checked terms always remain visible
- Works for both categories and tags interfaces
You can prevent the search field from appearing on selected taxonomies:
add_filter('admin_taxonomy_search_disabled', function($taxonomies){
return ['category', 'post_tag'];
});- Pure admin enhancement - no front-end impact
- Safe for large term lists
- Does not modify WordPress core behavior
- Fully generic and theme-agnostic
- Performance friendly (debounced client search)