Well I figured out I could duplicate the function and rename the title so it runs twice. But for future, is there a more elegant way of doing this in one instance? thanks!
// orderby slideshows
函数modify\\u slider\\u order($query,$slider\\u id){
// only alter the order for slider with "x" ID
// https://tinyurl.com/zb6hzpc
if($slider_id == 17 ) {
// Custom Meta key/name
$query[\'meta_key\'] = \'numeric_order\';
// Order by Custom Meta values
$query[\'orderby\'] = \'numeric_order\';
// Calculate order based on:
// \'NUMERIC\', \'CHAR\', \'DATE\', \'DATETIME\', \'TIME\'
$query[\'meta_type\'] = \'NUMERIC\';
}
return $query;
}
添加过滤器(\'revslider\\u get\\u posts\',\'modify\\u slider\\u order\',10,2);
//orderby幻灯片2
函数modify\\u slider\\u order2($query,$slider\\u id){
// only alter the order for slider with "x" ID
// https://tinyurl.com/zb6hzpc
if($slider_id == 16 ) {
// Custom Meta key/name
$query[\'meta_key\'] = \'numeric_order\';
// Order by Custom Meta values
$query[\'orderby\'] = \'numeric_order\';
// Calculate order based on:
// \'NUMERIC\', \'CHAR\', \'DATE\', \'DATETIME\', \'TIME\'
$query[\'meta_type\'] = \'NUMERIC\';
}
return $query;
}
添加过滤器(\'revslider\\u get\\u posts\',\'modify\\u slider\\u order2\',10,2);