[wp-trac] [WordPress Trac] #35762: Search in post excerpt

WordPress Trac noreply at wordpress.org
Mon Feb 22 21:33:46 UTC 2016


#35762: Search in post excerpt
------------------------------------------+-----------------------------
 Reporter:  sebastian.pisula              |       Owner:
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Query                         |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  has-patch has-unit-tests => needs-patch needs-unit-tests


Comment:

 Replying to [comment:3 swissspidy]:
 > The previous patch was missing an additional `$like` passed to
 `$wpdb->prepare`.
 >
 > [attachment:35762.diff] adds that, and an accompanying test.
 >
 > I like the idea of also searching the post excerpt and have implemented
 this on a couple of sites myself. Perhaps even 4.5 material?

 We'll need to add `post_excerpt` to the `orderby` logic in
 `WP_Query::parse_search_order()`. It could be lumped in with
 `post_content` or even, I'd suggest, one step higher in the priority than
 `post_content`.

 If we get this, we'll slip it into 4.5.

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


More information about the wp-trac mailing list