我想按meta_key和meta_value过滤我的结果。
我有一个视频分享网站,我想将结果过滤为罗马尼亚视频。
我尝试使用此代码:
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
);
但它没有用。
答案 0 :(得分:1)
sql or jpql.