Wordpress 如何使用wp_查询获得正确的搜索结果
我正在使用wp_查询来获取搜索结果。但它只搜索并返回匹配的标题。不返回匹配的内容和其他ACF字段。我该怎么做?我还在我的网站上使用“搜索一切”插件。下面是我的wp_查询的参数:Wordpress 如何使用wp_查询获得正确的搜索结果,wordpress,search,Wordpress,Search,我正在使用wp_查询来获取搜索结果。但它只搜索并返回匹配的标题。不返回匹配的内容和其他ACF字段。我该怎么做?我还在我的网站上使用“搜索一切”插件。下面是我的wp_查询的参数: $args = array( 'post_type' => $post_type, 'post_status' => 'publish', 'posts_per_page'=> $no_of_posts, 'offset'
$args = array(
'post_type' => $post_type,
'post_status' => 'publish',
'posts_per_page'=> $no_of_posts,
'offset' => $offset,
's' => $query,
);
我认为这就是问题所在 在术语前面加连字符将排除与该术语匹配的帖子 例如,“枕头沙发”将返回包含“枕头”但不包含“沙发”的帖子