DEV Community

Cover image for WordPress has no search for its own admin menu — here's how to add one
Lucas Fenwick
Lucas Fenwick

Posted on

WordPress has no search for its own admin menu — here's how to add one

Open wp-admin on any site with a serious plugin stack. WooCommerce, an SEO plugin, a form builder, a backup tool, a page builder — each registers top-level menu items and submenus, and the sidebar grows to 25-30 entries. Now find one specific setting. WordPress ships no search for its own admin menu, so you scroll, hover to expand submenus, and scan labels.

The build-it-yourself route is a small admin plugin — walk the global $menu / $submenu, index each page's slug and parent, and inject a filter input at the top of #adminmenu:

add_action('admin_footer', function () {
    ?>
    <script>
    (function () {
        const menu = document.querySelector('#adminmenu');
        if (!menu) return;
        const box = document.createElement('input');
        box.type = 'search';
        box.placeholder = 'Search tools…';
        box.style.cssText = 'width:90%;margin:8px auto;display:block;padding:6px;';
        menu.parentNode.insertBefore(box, menu);
        box.addEventListener('input', () => {
            const q = box.value.toLowerCase();
            menu.querySelectorAll('li.menu-top').forEach(li => {
                li.style.display = li.textContent.toLowerCase().includes(q) ? '' : 'none';
            });
        });
    })();
    </script>
    <?php
});
Enter fullscreen mode Exit fullscreen mode

That gets you top-level filtering. The gaps you then fill: it doesn't match submenu labels unless you index and reveal parents, it doesn't survive wp_menu reorders cleanly, and there's no keyboard focus, highlight, or jump-to behavior. It's a real script to build and maintain on every install.

I tested the settings-panel version with WP Adminify Pro instead. Short demo below (20s).

What a searchless admin menu costs you:

  • Scrolling a 25-item sidebar to find one page
  • Hovering to expand submenus just to see what's inside
  • Clients who can't locate settings you configured for them

What changed after enabling Menu Search in Adminify Pro:

  • One toggle under Admin Menu → Settings — a "Search tools…" box pins to the top of the menu
  • Filters top-level items and submenus as you type
  • Click a match to jump straight to that screen — "perma" → Permalinks, "widget" → Widgets
  • Works on every admin page, no snippet to maintain across sites

Short demo

Step-by-step doc: https://wpadminify.com/docs/adminify/admin-menu/menu-layout-options

How do you handle navigation in a plugin-heavy wp-admin — memorize positions, collapse the menu, or something smarter?

Top comments (0)