Created
September 16, 2015 14:21
-
-
Save aibrean/09387dc5b265120735a6 to your computer and use it in GitHub Desktop.
ACF Modals with repeater
This file contains 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 if (have_rows('action_buttons')) { | |
$counter = 1; ?> | |
<?php | |
while (have_rows('action_buttons')) { | |
the_row(); | |
?> | |
<!--Trigger--> | |
<a href="#" data-reveal-id="Modal<?php echo $counter ?>" class="button small"><?php the_sub_field('trigger') ?></a> | |
<div id="Modal<?php echo $counter ?>" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog" data-options="close_on_background_click:false"> | |
<br> | |
<h1><?php the_sub_field('title') ?></h1> | |
<p><?php the_sub_field('text') ?></p> | |
<a class="close-reveal-modal" aria-label="Close">×</a> | |
</div> | |
<?php $counter++; | |
} // while: ?> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment