SlugDetective
SlugDetective is a WordPress plugin that enhances your admin experience by allowing you to easily search for posts and pages based on their slugs.
by Dragi Postolovski · github.com/dragipostolovski/slugdetective
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/dragipostolovski/slugdetective/archive/refs/heads/master.zipSlug Detective adds a simple way to search posts by their slug inside the WordPress admin.
It works in two places:
- The main post search in the admin list view.
- ACF Relationship fields.
This is useful when the post title differs from its slug or when slugs follow a naming pattern.
How It Works
Use a special search pattern when searching:
| Pattern | Example | Effect |
|---|---|---|
slug:your-slug |
slug:product-123 |
Matches posts with an exact slug. |
slug:your-slug:like |
slug:product:like |
Matches posts where the slug contains the value. |
Exact Match
slug:hello-world
Partial Match
slug:hello:like
This will return any post where the slug contains hello.
Where You Can Use It
Post List Search
In Posts, Pages, or any custom post type:
ACF Relationship Field
When searching inside the field: slug:my-post
Works the same way as the admin list.
Example Use Cases
- You use machine-friendly slugs to categorize items and want fast lookup.
- Your titles are translated but slugs stay original.
- You need to quickly locate posts generated by import tools.
Installation
- Upload the plugin folder to
wp-content/plugins/. - Activate the plugin in Plugins.
- No further configuration needed.
Important Notes
- The search only triggers when the query starts with
slug:. - Everything else works as normal.
- Does not modify front-end queries.
Author
Dragi Postolovski
License
GPL-2.0 or later