我需要以某种方式在管理面板中实现功能,以便我可以为特定自定义帖子类型的画廊添加图像,也可以查看/编辑从管理面板上传的所有图像。
P.S,我想在主题中开发此功能而不使用任何插件。
<?php if( have_rows('repeater_field_name') ): ?>
<ul class="slides">
<?php
while( have_rows('repeater_field_name') ): the_row();
$image = get_sub_field('image');
?>
<li class="slide">
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt'] ?>" />
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>