[wp-trac] [WordPress Trac] #20044: Enable search for pages by slug

WordPress Trac noreply at wordpress.org
Thu Jan 22 12:58:11 UTC 2026


#20044: Enable search for pages by slug
-------------------------+---------------------
 Reporter:  ekitomat     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:
Component:  Query        |     Version:  3.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+---------------------
Changes (by huzaifaalmesbah):

 * keywords:  needs-testing needs-patch => needs-patch


Comment:

 == Test Report

 Patch tested:
 ❌ No working patch available (existing patches 20044.diff → 20044.5.diff
 are outdated and do not apply cleanly)


 === Steps to Reproduce / Test

 Screencast: https://files.catbox.moe/qzoif8.mp4

 **Dashboard (Admin Search)**

 1. Navigate to **Pages → Add New**.
 2. Create a new page with:

    * Title: `Slug Search Test`
    * Slug: `slug-search-test`
 3. Publish the page.
 4. Go to **Pages → All Pages**.
 5. Search for `slug-search-test` using the search box.

 **Frontend Search**

 1. Open the site frontend.
 2. Use the site search form.
 3. Search for `slug-search-test`.


 === Expected Results

 * Pages should be searchable by **slug**.
 * Searching by exact slug should return the matching page.
 * Behavior should be consistent in:
   * Admin dashboard search
   * Frontend search results

 === Environment
 - WordPress: 7.0-alpha-61215-src
 - PHP: 8.2.29
 - Server: nginx/1.29.4
 - Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 143.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-One 2.7
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.1
 === Actual Results

 **Before applying any patch**

 * ❌ Searching by slug in **Pages → All Pages** returns no results.
 * ❌ Searching by slug on the frontend returns no results.
 * ✅ Searching by title or content works correctly.

 **After applying existing patches (20044.diff – 20044.5.diff)**

 * ❌ Patches are outdated (12+ years old).
 * ❌ Patches do not apply cleanly on current WordPress.
 * ❌ No improvement in search ordering or relevance.


 === Notes

 * Issue is **reproducible** in current WordPress.
 * Existing patches attached to the ticket are **obsolete**.
 * A **new patch is required**

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/20044#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list