File: /home/slyfwmm/incastiglionfiorentino/wp-content/themes/amplify/contentslider.php
<div class="feature" style="padding-top:0px; padding-bottom:5px;">
<div class="feature_entry">
<!-- content slider -->
<div id="slider">
<div class="underslider"></div>
<!-- Add the class "contentWrap" and the property "content" to the element of class "content" -->
<div class="contentWrap" style="width:960px; height:340px; overflow:hidden;">
<!-- SLIDER BEGIN -->
<?php
$full_content_cat = get_option('bb_full_content_cat');
if($full_content_cat == NULL || $full_content_cat == 'Choose a category') {$full_content_cat = 'slider';}
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query('category_name=' . $full_content_cat . '&showposts=5');
$count = 0;
while ($wp_query->have_posts()) : $wp_query->the_post();
$count++;
?>
<!-- displays the slider posts -->
<div class="content"<?php if(get_field( 'vimeo_embed_value') == NULL && get_field( 'youtube_embed_value') == NULL) { ?> style="background:url('<?php echo get_field( 'large_image_value') ?>') top left no-repeat;"><a href="<?php if(get_field( 'external_link_value') != NULL) {echo get_field( 'external_link_value');} else{the_permalink();} ?>" title="<?php the_title(); ?>" style="display:block;width:100%;height:100%;position:absolute;"> </a><?php } else if(get_field( 'vimeo_embed_value') != NULL) { echo '>'; ?>
<!-- Vimeo -->
<?php $vimeo = preg_replace('/\D*(\d+(\.\d+)?)/', "$1", get_field( 'vimeo_embed_value')); ?>
<object width="604" height="340"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="https://vimeo.com/moogaloop.swf?clip_id=<?php echo $vimeo; ?>&server=vimeo.com&show_title=1&show_byline=1&show_portrait=1&color=00ADEF&fullscreen=1&autoplay=0&loop=0" /><embed src="https://vimeo.com/moogaloop.swf?clip_id=<?php echo $vimeo; ?>&server=vimeo.com&show_title=1&show_byline=1&show_portrait=1&color=00ADEF&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="604" height="340"></embed></object>
<div class="left" style="width:311px;"><h1><a href="<?php if(get_field( 'external_link_value') != NULL) {echo get_field( 'external_link_value');} else{the_permalink();} ?>" title="<?php the_title(); ?>"><?php if(get_field( 'slider_short_title_value') != NULL) {_e(get_field( 'slider_short_title_value'));} else {_e(the_title());} ?></a></h1><?php if(get_field( 'slider_desc_value') != NULL) {_e(get_field( 'slider_desc_value'));} else {_e(the_content());} ?></div>
<?php } else if(get_field( 'youtube_embed_value') != NULL) { echo '>'; ?>
<!-- Youtube -->
<?php
function my_strip($start,$end,$total){
$total = stristr($total,$start);
$f2 = stristr($total,$end);
return substr($total,strlen($start),-strlen($f2));
}
$string=get_field( 'youtube_embed_value');
$youtube=my_strip("?v=","&",$string);
?>
<object type="application/x-shockwave-flash" data="https://www.youtube.com/v/<?php echo $youtube; ?>?fs=1&hl=en_US&color1=0x3a3a3a&color2=0x999999" width="560" height="340"><param name="movie" value="https://www.youtube.com/v/<?php echo $youtube; ?>?fs=1&hl=en_US&color1=0x3a3a3a&color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param></object>
<div class="left"><h1><a href="<?php if(get_field( 'external_link_value') != NULL) {echo get_field( 'external_link_value');} else{the_permalink();} ?>" title="<?php the_title(); ?>"><?php if(get_field( 'slider_short_title_value') != NULL) {_e(get_field( 'slider_short_title_value'));} else {_e(the_title());} ?></a></h1><?php if(get_field( 'slider_desc_value') != NULL) {_e(get_field( 'slider_desc_value'));} else {_e(the_content());} ?></div>
<?php } ?>
<?php if(get_field( 'vimeo_embed_value') == NULL && get_field( 'youtube_embed_value') == NULL) { ?>
<div class="right"><h1><a href="<?php if(get_field( 'external_link_value') != NULL) {echo get_field( 'external_link_value');} else{the_permalink();} ?>" title="<?php the_title(); ?>"><?php if(get_field( 'slider_short_title_value') != NULL) {_e(get_field( 'slider_short_title_value'));} else {_e(the_title());} ?></a></h1><?php if(get_field( 'slider_desc_value') != NULL) {_e(get_field( 'slider_desc_value'));} else {_e(the_content());} ?></div>
<?php } ?></div>
<!-- end slider posts display -->
<?php endwhile; $wp_query = null; $wp_query = $temp; ?>
<!-- SLIDER POSTS END -->
</div>
<div class="buttonsWrap">
<?php
$full_content_cat = get_option('bb_full_content_cat');
if($full_content_cat == NULL || $full_content_cat == 'Choose a category') {$full_content_cat = 'slider';}
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query('category_name=' . $full_content_cat . '&showposts=5');
$count = 0;
while ($wp_query->have_posts()) : $wp_query->the_post();
$count++;
?>
<!-- displays the slider controls -->
<a href="#" class="buttons bt<?php echo $count; ?> <?php if ($count == 1) {echo "active";} ?>" rel="<?php echo $count; ?>"></a>
<?php endwhile; $wp_query = null; $wp_query = $temp; ?>
<!-- end slider controls -->
</div>
</div>
</div><!-- end div.feature_entry -->
</div><!-- end div.feature -->