Created
January 4, 2021 11:40
-
-
Save onuproy/14b1cf1cf5c0c4acdadee93a6475b97c to your computer and use it in GitHub Desktop.
ACF Repeater loop By Wordpress
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
<!-- banner-area --> | |
<div id="owl-id" class="aaaaaa owl-carousel owl-theme"> | |
<!-- single item --> | |
<?php if(have_rows('hero_slider_item')) :?> | |
<?php while(have_rows('hero_slider_item')) : the_row(); | |
$add_single_slider = get_sub_field('add_single_slider'); | |
$slider_title = get_sub_field('slider_title'); | |
$slider_sub_title = get_sub_field('slider_sub_title'); | |
$learn_more_button_text = get_sub_field('learn_more_button_text'); | |
$learn_more_button_url = get_sub_field('learn_more_button_url'); | |
?> | |
<!-- Slider Single Item --> | |
<div class="banner-area" style="background: url('<?php echo $add_single_slider['url'];?>') no-repeat scroll 0 0 / cover;"> | |
<div class="container"> | |
<div class="banner-bg"> | |
<div class="row"> | |
<div class="col-lg-12"> | |
<div class="banner-text text-center"> | |
<h2><?php echo $slider_title?></h2> | |
<h1><?php echo $slider_sub_title?></h1> | |
<div class="button"> | |
<a href="<?php echo $learn_more_button_url?>"><?php echo $learn_more_button_text?></a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Slider Single Item --> | |
<?php endwhile;?> | |
<?php endif;?> | |
<!-- single item --> | |
</div> | |
<!-- banner-area-end --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment