我想通过meta_key和meta_value筛选我的结果。通过meta_value和meta_key进行筛选
我有一个视频共享网站,我想过滤结果只是在罗马尼亚视频。
我尝试使用此代码:
query_posts(array('post_type' => array('episodes'), 'meta_key' => 'idioma', 'meta_value' => 'td','meta_compare' => 'IN'));
不过,我想只显示与meta_key idioma
和meta_value与TD
的结果。
这是我的数据库:
我尝试用这个ARG:
$args = array(
'post_type' => 'array ('episodes')', // Here is the type of posts, you told me I'm on array ('episodes')
'post_status' => 'publish', // If you have a post status, I assumed you would publish
'orderby' => 'td', // Ordered after meta_value and after meta_key
'meta_key' => 'idioma', // Custom meta_key name
'order'=> 'DESC' // sort descending
);
但它不工作。
看看http://php.net/manual/en/function.array-filter.php – Pete