我有一个自定义帖子类型查询:
$paged = ( get_query_var( \'paged\' ) ) ? get_query_var( \'paged\' ) : 1;
$args = array(
\'paged\' => $paged,
\'post_type\' => \'my_custom_post_type\',
\'orderby\' => \'meta_key\',
// Here I am filtering posts further
\'meta_query\'=> array(
array(
\'key\' => \'_assignment_type\',
\'value\' => \'sales_assignment\',
\'compare\' => \'LIKE\',
),
),
// This is the part that isn\'t working at all:
\'meta_key\' => \'_homepage_publish_date\',
\'meta_type\' => \'datetime\',
\'order\' => \'DESC\',
\'posts_per_page\' => 30,
);
query_posts($args);
homepage\\u publish\\u date上的值如下:2019-06-05 18:29:32.000
每当我尝试使用此顺序时,查询都会按照创建帖子的顺序返回帖子。
这里会出什么问题?