0
나는 ajax suggest plugin을 썼고, 이제는 post_title
대신 게시물 미리보기 이미지를 얻고 싶지만, 어떻게해야할지 모르겠다.get post thumbnail wp_list_pluck
$s = trim(stripslashes($_GET['q']));
$query_args = apply_filters('wpss_search_query_args', array(
's' => $s,
'post_status' => 'publish',
), $s);
$query = new WP_Query($query_args);
if ($query->posts) {
$results = apply_filters('wpss_search_results', wp_list_pluck($query->posts, 'post_title'), $query);
echo join($results, "\n");
}