带有List-Group-Vimeo的ACF插件WP

时间:2016-10-28 作者:Sam

我想在列表组中集成WP ACF插件的变量,但我不知道如何开始。。。有人可以帮我一下。

我的代码:

    <div class="embed-responsive embed-responsive-16by9">
     <iframe id="vimeo-player-1" class="embed-responsive-item" src="https://player.vimeo.com/video/186190015?api=1&player_id=vimeo-player-1&amp;title=0&amp;byline=0&amp;portrait=0&amp;playbar=0&amp;loop=1&amp" frameborder="0" data-progress="true" data-seek="true" data-bounce="false" data-title="Planification" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>



    <div class="list-group">






<a href="#" data-id="vimeo-player-1" data-seek="00.0" class="timecode list-group-item list-group-item-action"><i class="fa fa-play-circle-o" aria-hidden="true"></i>Introduction<span class="badge">0:24</span></a>

<a href="#" data-id="vimeo-player-1" data-seek="24.0" class="timecode list-group-item list-group-item-action"><i class="fa fa-play-circle-o" aria-hidden="true"></i> PIC & Plan d’approvisionnement<span class="badge">0:52</span></a>
<a href="#" data-id="vimeo-player-1" data-seek="76.0" class="timecode list-group-item list-group-item-action"><i class="fa fa-play-circle-o" aria-hidden="true"></i> PDP<span class="badge">0:17</span></a>
<a href="#" data-id="vimeo-player-1" data-seek="131.0" class="timecode list-group-item list-group-item-action"><i class="fa fa-play-circle-o" aria-hidden="true"></i> Plan de charges<span class="badge">0:55</span></a>  
<a href="#" data-id="vimeo-player-1" data-seek="159.00" class="timecode list-group-item list-group-item-action"><i class="fa fa-play-circle-o" aria-hidden="true"></i> L’ordonnancement<span class="badge">0:28</span></a> 
<a href="#" data-id="vimeo-player-1" data-seek="177.0" class="timecode list-group-item list-group-item-action"><i class="fa fa-play-circle-o" aria-hidden="true"></i> Autres fonctionnalités Planification<span class="badge">0:18</span></a> 
    </div>


</div>
对于vimeo url,这是可以的。但它不适用于列表组。

我需要一个带有repeater功能的版本pro?非常感谢。Ju公司

1 个回复
最合适的回答,由SO网友:Sam 整理而成

这个代码是对的?

<?php if(get_field(\'yo\')): ?>

    <div class="list-group">

<?php while(has_sub_field(\'yo\')): ?>

<a href="#" data-id="vimeo-player-1" data-seek="<?php the_sub_field(\'dataseek_meta\'); ?>" class="timecode list-group-item list-group-item-action"><i class="fa fa-play-circle-o" aria-hidden="true"></i><?php the_sub_field(\'seek_name\'); ?><span class="badge"><?php the_sub_field(\'dataseek\'); ?></span></a>

<?php endwhile; ?>

谢谢