我正在编写一个wordpress代码,如下所示modified post displays at the top.
$temp_args = [
\'post_type\' => array(\'current-channel\', \'post\', \'current-episodes\'),
\'post_status\' => \'publish\',
\'orderby\' => array(
\'feat_yes\' => \'ASC\',
\'post_type\' => \'ASC\',
\'modified\' => \'DESC\',
\'date\' => \'DESC\'),
\'posts_per_page\' => $data->{"no_articles_" . ICL_LANGUAGE_CODE},
\'tax_query\' => [
[
\'taxonomy\' => \'category\',
\'field\' => \'term_id\',
\'terms\' => $cat_today,
],
],
];
$q = new WP_Query($temp_args);
此时,按以下方式进行订购:\'orderby\' => array(
\'feat_yes\' => \'ASC\',
\'post_type\' => \'ASC\',
\'modified\' => \'DESC\',
\'date\' => \'DESC\'),
Problem Statement:
我想知道我应该在上面的代码中做些什么更改,以便sticky posts are displayed at the top before the regular post.订单应该是这样的sticky post should be always at the top 然后all the regular post