Created
November 25, 2016 17:46
-
-
Save luisfelipe-dev/3d637c53e042a0c2ab1eb014719dd713 to your computer and use it in GitHub Desktop.
Loop para adicionar uma classe ao primeiro elemento.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php $firstMarked = false; ?> | |
| <?php if ( have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?> | |
| <dt class="collapsible-title <?php echo !$firstMarked ? "is-active":"";?>"> | |
| <h1><?php the_field('titulo1_video'); ?></h1> | |
| <h2><?php the_field('titulo2_video'); ?></h2> | |
| </dt> | |
| <dd class="collapsible-content"> | |
| <?php if(have_rows('videos_youtube')): while(have_rows('videos_youtube')) : the_row(); ?> | |
| <div class="video-yt"> | |
| <div class="embed-responsive embed-responsive-16by9"> | |
| <iframe width="560" height="315" src="https://www.youtube.com/embed/<?php the_sub_field('link_video');?>" frameborder="0" allowfullscreen></iframe> | |
| </div> | |
| </div><!-- /video --> | |
| <?php endwhile; else : endif; ?> | |
| </dd><!-- /collapsible-title is-active --> | |
| <?php $firstMarked = true;?> | |
| <?php endwhile; else: endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment