搜索过滤
//搜索过滤,仅搜索post文章 function SearchFilter($query){ //仅搜索时 if($query->is_search){ //设定指定的文章类型,这里仅搜索文章 $query->set('post_type',array('post')); //指定文章和自定义类型 //$query->set('post_type', array('p
//搜索过滤,仅搜索post文章 function SearchFilter($query){ //仅搜索时 if($query->is_search){ //设定指定的文章类型,这里仅搜索文章 $query->set('post_type',array('post')); //指定文章和自定义类型 //$query->set('post_type', array('p