Content Marketing

WordPress Plugin: Advanced Admin Search With Title, Slug, Content, or Tag

Finding content in the WordPress admin panel can quickly become a chore, especially for sites with hundreds or thousands of posts. By default, the search box in the All Posts screen is limited in capability—it only checks post titles, and there’s no built-in way to search specifically by slug, content, or tags. If you’re a developer, editor, or content manager looking for faster, more precise filtering inside the admin, this limitation can be frustrating.

The Problem: Inflexible Admin Search

Have you ever tried to locate a post by its slug, only to realize WordPress admin search doesn’t support that? Or needed to scan the list of posts for a particular tag without manually clicking through filters? Perhaps you’ve been looking for a post with a specific keyword in its title, not just the body content.

WordPress offers basic search capabilities in the admin area, but lacks advanced filtering and visibility options. Most notably:

  • You can’t search by slug: This is critical when cleaning up URL structures or identifying duplicate slugs.
  • There’s no way to qualify your search: You can’t use field-specific prefixes like title:, content:, or tag:.
  • The post list doesn’t display slugs: That makes it hard to see how your URLs are structured without editing each post individually.

The Solution: Admin Advanced Search Plugin

The Admin Advanced Search plugin addresses all these issues with a lightweight, zero-configuration code drop-in. Once installed, it quietly enhances your WordPress admin post list in three powerful ways:

  • Qualified search filters: You can now use specific search prefixes to drill down:
    • slug:custom-url-part
    • title:"Exact Match Title"
    • content:keyword
    • tag:marketing
      These qualifiers allow you to search directly against specific post fields.
  • Multi-field search parsing: You can combine qualifiers in a single search. For example:
    title:"Privacy Policy" slug:privacy content:"data collection"
  • Slug column in admin list: Adds a new Slug column to your admin post listings, so you can immediately view each post’s URL slug without editing.

This tool is ideal for marketers managing SEO-friendly URLs, developers maintaining content hierarchies, and publishers working with structured content at a large scale.

Installation Instructions

This is a simple plugin you can install manually. Here’s how:

  1. Open your WordPress site’s file system using FTP, SSH, or the File Manager in your hosting control panel.
  2. Navigate to wp-content/plugins/.
  3. Create a new folder named admin-advanced-search.
  4. Inside that folder, create a file named admin-advanced-search.php.
  5. Paste the full plugin code into that file (provided below).
<?php
/*
Plugin Name: Admin Advanced Search
Description: Adds slug search and qualifier support (slug:, title:, content:, tag:) to WordPress admin post list. Also adds a slug column. 
Version: 1.3.1
Author: Douglas Karr
Author URI: https://dknewmedia.com
*/

if (!defined('ABSPATH')) exit;

// Enhanced search with support for slug:, title:, and content:
add_filter('posts_search', 'admin_custom_qualified_search_with_tag', 10, 2);
function admin_custom_qualified_search_with_tag($search, $query) {
    global $wpdb;

    if (!is_admin() || !$query->is_main_query()) {
        return $search;
    }

    $screen = get_current_screen();
    if (!$screen || strpos($screen->base, 'edit') === false) {
        return $search;
    }

    $raw = $query->get('s');
    if (empty($raw)) {
        return $search;
    }

    // Only run this if a qualified token is found
    if (!preg_match('/\b(slug|title|content|tag):/', $raw)) {
        return $search; // Fallback to native search
    }

    $search = ' AND (';
    $clauses = [];

    // Token parsing (quoted or unquoted)
    preg_match_all('/(?:slug|title|content|tag):"([^"]+)"|(?:slug|title|content|tag):(\S+)/', $raw, $matches, PREG_SET_ORDER);

    foreach ($matches as $match) {
        $value = $wpdb->esc_like(!empty($match[1]) ? $match[1] : $match[2]);
        $token = strtok($match[0], ':');
        $value = '%' . $value . '%';

        switch ($token) {
            case 'slug':
                $clauses[] = "{$wpdb->posts}.post_name LIKE '{$value}'";
                break;
            case 'title':
                $clauses[] = "{$wpdb->posts}.post_title LIKE '{$value}'";
                break;
            case 'content':
                $clauses[] = "{$wpdb->posts}.post_content LIKE '{$value}'";
                break;
            case 'tag':
                // Join against tags
                $clauses[] = "{$wpdb->posts}.ID IN (
                    SELECT object_id
                    FROM {$wpdb->term_relationships} AS tr
                    INNER JOIN {$wpdb->term_taxonomy} AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
                    INNER JOIN {$wpdb->terms} AS t ON tt.term_id = t.term_id
                    WHERE tt.taxonomy = 'post_tag' AND t.name LIKE '{$value}'
                )";
                break;
        }
    }

    if (!empty($clauses)) {
        $search .= implode(' AND ', $clauses) . ')';
    } else {
        $search = '';
    }

    return $search;
}
// Add slug column to admin post lists
add_filter('manage_posts_columns', 'admin_slug_add_column');
add_action('manage_posts_custom_column', 'admin_slug_show_column', 10, 2);

function admin_slug_add_column($columns) {
    $columns['slug'] = 'Slug';
    return $columns;
}

function admin_slug_show_column($column_name, $post_id) {
    if ($column_name == 'slug') {
        echo esc_html(get_post_field('post_name', $post_id));
    }
}
  1. Log in to your WordPress admin dashboard.
  2. Go to Plugins > Installed Plugins and activate Admin Advanced Search.

That’s it—no settings, no configurations, just better admin tools instantly.

How to Use Advanced Admin Search

Once installed and activated:

  1. Go to Posts > All Posts in your admin dashboard.
  2. In the search box, enter a query using one or more of the supported qualifiers:
    • slug:about
    • title:"Contact Us"
    • content:refund
    • tag:seo
  3. Combine them for deeper filtering:
    title:"Terms" content:payment slug:terms
  4. In the post list view, look for the new Slug column on the right. This helps you audit your post URLs without needing to dive into each post’s settings.

The plugin currently supports posts only, but it could easily be extended to pages or custom post types with a few minor adjustments.

Suppose you’re running a content-heavy WordPress site and have ever struggled to find a specific post in the admin interface. In that case, Admin Advanced Search is a practical tool that immediately improves your workflow. Install it once, and every admin on your team gets better search clarity and faster navigation—no bloat, no extra settings, just smart enhancements where you need them most.

Douglas Karr

Douglas Karr is a fractional Chief Marketing Officer specializing in SaaS and AI companies, where he helps scale marketing operations, drive demand generation, and implement AI-powered strategies. He is the founder and publisher of Martech Zone, a leading publication in marketing technology, and a trusted advisor to startups and enterprises… More »
Back to top button
Close

Adblock Detected

We rely on ads and sponsorships to keep Martech Zone free. Please consider disabling your ad blocker—or support us with an affordable, ad-free annual membership ($10 US):

Sign Up For An Annual Membership