Opened 9 years ago
Closed 9 years ago
#33074 closed enhancement (fixed)
Query by post_title
Reported by: | wonderboymusic | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 1.5 |
Component: | Query | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
If you are using wp_posts
as an object store, sometimes you want to do an exists lookup by "name" or "title" - here's what doing that now looks like:
$tacos = get_posts( [ 'post_type' => 'taco', 's' => $name, 'exact' => true, 'sentence' => true, 'post_status' => 'publish', 'fields' => 'ids', 'posts_per_page' => 1 ] );
I don't want to hear any arguments about performance without an acknowledgment that LIKE
wildcard searches against serialized meta_value
s exist.
Attachments (2)
Change History (10)
#3
@
9 years ago
- Keywords has-patch commit added; needs-patch good-first-bug removed
33074.diff accomplishes this
#5
follow-up:
↓ 6
@
9 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 33706:
Note: See
TracTickets for help on using
tickets.
Related: #33065