admin管理员组

文章数量:1306951

By default, WordPress searches by keyword. What this means is that when passed the search query football boots, WordPress builds the following for the WHERE clause:

((wp_posts.post_title LIKE '%football%') OR

(wp_posts.post_content LIKE '%football%'))

AND


((wp_posts.post_title LIKE '%boots%') OR

(wp_posts.post_content LIKE '%boots%'))

but what if I would like to change this behaviour and I want it like following:

((wp_posts.post_title LIKE '%football%') OR

(wp_posts.post_content LIKE '%football%'))

OR


((wp_posts.post_title LIKE '%boots%') OR

(wp_posts.post_content LIKE '%boots%'))

本文标签: pluginsany word search Wordpress