[wp-trac] [WordPress Trac] #33074: Query by post_title

WordPress Trac noreply at wordpress.org
Wed Jul 22 15:28:37 UTC 2015


#33074: Query by post_title
----------------------------+----------------------------------------
 Reporter:  wonderboymusic  |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Future Release
Component:  Query           |    Version:  1.5
 Severity:  normal          |   Keywords:  needs-patch good-first-bug
  Focuses:                  |
----------------------------+----------------------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33074>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list