很多人说用meta_query来实现,测试完全不行,使用下面代码可以
$title=''; if(isset($_GET['title'])){ $title=$_GET['title']; } $args=array( 'post_status' => 'publish', 'post_type' => 'post', 'order' => 'DESC', 'cat' => $catid, 'posts_per_page'=>12, 's' => $title, 'paged'=>$paged );