HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/KLeeuwen/samenbouwen.in/wwwroot/wp-content/themes/Avada/include/slider.php
<div id="carouselHomeTop" class="carousel fade">
	<div class="carousel-inner">      
<?php 
	$args = array('post_type' => array( 'slider'), 'post_status' => 'publish');
	$query = new WP_Query($args);
	$firstSliderImg = $captions = $firstImg = '';
	if($query->found_posts) {
		while ( $query->have_posts() ) : $query->the_post();
			if(strpos(strtolower(get_the_title()), 'homepage') !== false) { 
				if(have_rows('slider_item')) {
					$i = 0;
					while ( have_rows('slider_item') ) : the_row();
						$image = get_sub_field('image');
						$button = get_sub_field('button_text');
						$link = get_sub_field('url');
						$text = trim(html_entity_decode(get_sub_field('text')));
						
						if(substr($text, 0,1) == '"') {
							$pos = strpos($text, '"', 1);
							$quote = substr($text, 1, $pos - 1);
							$author = substr($text, $pos + 1);
							$text = '<h1 class="sliderquote">&quot;'.$quote.'&quot;</h1><p class="lead"><b>'.$author.'</b></p>';							
						} else 
							$text = '<h1>'.$text.'</h1>';
						if($i == 0) {
							$firstSliderImg = $image['url'];
							$firstImg = $image;
						}							
						?>
						<div class="item <?php if($i == 0) echo 'active';?>" style="background-image:url(<?php echo $image['url'] ?>); -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;">
							<!--<img src="<?php echo $image['url'] ?>" alt="<?php echo $image['alt'] ?>" /> -->
							<div class="container">
								<div class="carousel-caption" 
									<?php if($url = get_sub_field('url')) {?> onclick="window.location='<?php echo $url?>'"<?php }?> ><?php echo $text; ?>
									<div class="button_slider" style="width:100%; text-align:center; margin-top:30px;"><a href="<?php echo $link ?>"><button class="obtn" style="border: none;"><?php echo $button ?></button></a></div>




								</div>
							</div>
						</div>
						<?php 
						$i++;					
					endwhile;
				} 
				break;
			}
		endwhile;	
	}
	?>	        	
	</div>
    <a class="left carousel-control" href="#carouselHomeTop" data-slide="prev">&lsaquo;</a>
    <a class="right carousel-control" href="#carouselHomeTop" data-slide="next">&rsaquo;</a>
</div><!-- /.carousel -->