admin管理员组

文章数量:1322004

$args = [
        's' => $autocompleteTerm,
        'orderby' => 'modified',
        'fields' => 'all',
        'post_status' => array('publish','future'),
    ];

$posts_query = new \WP_Query($args);
return $posts_query->get_posts();

$autocompleteTerm is a string of what I am searching for, for example, if I publish an article with title 'top 10 candies'

when $autocompleteTerm = 'top 10', return is empty.

it works if $autocompleteTerm = 'top' instead

本文标签: wp queryWPQuery no result if keyword contains number