我创建了一个Post对象字段类型(请参见所附的屏幕截图Post-Object-0.png)
如何根据用户的选择顺序输出讲师(请参见随附的截图post object.png)
我的查询如下:
$instructors = get_sub_field( \'instructors\');
//var_dump( $instructors );
$total = count($instructors);
$posts = get_posts(array(
\'post_type\' => \'kgi_personnel\',
\'posts_per_page\' => $total,
\'post_status\' => \'publish\',
\'include\' => $instructors
));
提前感谢您,
瑞安