File: /home/slyfwmm/incastiglionfiorentino/wp-content/themes/amplify/index.php
<?php
/**
Amplify theme
Author: BRAINBUZZmedia
Author URI: http://www.brainbuzzmedia.com
Index
*
* The main template file.
*
*/
get_header(); ?>
<!--<div align="center" class="pushbar-distanza"><a href="<?php bloginfo('url'); ?>/la-tua-pubblicita-in-questo-sito-web"><img src="<?php echo get_template_directory_uri(); ?>/images/960_45.png" alt="Spazio Pubblicitario" /></a></div>-->
<div id="main_container">
<!-- IE7 float fix --><!--[if lt IE 7]><span class="iefix">.</span><![endif]-->
<div class="main">
<div class="entries_full">
<div class="entry_full">
<?php $show_feature_1 = get_option('bb_show_feature_1');
if($show_feature_1 != 'no') {
?>
<!-- FEATURED1 POSTS BEGIN -->
<?php
$featured_1_cat = get_option('bb_featured_1_cat');
if($featured_1_cat == NULL || $featured_1_cat == 'Choose a category') {$featured_1_cat = 'featured1';}
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query('category_name=' . $featured_1_cat . '&showposts=3');
$count = 0;
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
<!-- displays the featured1 posts -->
<!-- gives the posts individual numbers between 1-3 for styling -->
<?php $count++; if($count > 3) { $count = 1; } ?>
<div class="box_third margin_top_25<?php if($count == 3) { echo " last"; } ?>" id="post-<?php the_ID(); ?>">
<h4><a href="<?php if(get_field('external_link_value') != NULL) {_e(get_field('external_link_value'));} else{the_permalink();} ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
<div class="mag"><!-- magnifying glass div -->
<?php if(get_field('fullsize_value') != NULL){ ?><a href="<?php echo get_field('fullsize_value'); ?>" rel="prettyphoto" title="<?php the_title_attribute(); ?>"><?php } else { ?><a class="noimage" href="<?php if(get_field('external_link_value') != NULL) {echo get_field('external_link_value');} else{the_permalink();} ?>" title="<?php the_title_attribute(); ?>"><?php } ?><?php if(get_field('large_image_value') != NULL){ ?><div style="width:300px;height:120px;overflow:hidden;"><img style="object-fit:cover;width:100%;height:100%;" src="<?php echo get_field('large_image_value') ?>" alt="<?php the_title(); ?>" /></div><?php } ?></a>
</div><!-- end magnifying glass div -->
<?php global $more; $more = false; ?>
<?php if (!empty($post->post_excerpt)) : ?>
<?php the_excerpt(''); ?>
<?php else : ?>
<?php the_content('<span><!--:it-->Leggi tutto<!--:--><!--:en-->Continue Reading</span><!--:-->'); ?>
<?php endif; ?>
<?php $more = true; ?>
</div>
<!-- end featured1 post display -->
<?php endwhile; $wp_query = null; $wp_query = $temp; ?>
<!-- FEATURED1 POSTS END -->
<?php } ?>
<div class="clear"></div>
<?php $show_feature_2 = get_option('bb_show_feature_2');
if($show_feature_2 != 'no') {
?>
<!--<div id="300_120">
<div style="float:left;width:640px;">
<div id="300_120_1"><img src="<?php echo get_template_directory_uri(); ?>/images/300_120.png" alt="ADV SPACE" /></div>
<div id="300_120_2"><img src="<?php echo get_template_directory_uri(); ?>/images/300_120.png" alt="ADV SPACE" /></div>
</div>
<div id="300_120_3"><img src="<?php echo get_template_directory_uri(); ?>/images/300_120.png" alt="ADV SPACE" /></div>
</div>-->
<!-- FEATURED2 POSTS BEGIN -->
<?php
$featured_2_cat = get_option('bb_featured_2_cat');
if($featured_2_cat == NULL || $featured_2_cat == 'Choose a category') {$featured_2_cat = 'featured2';}
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query('category_name=' . $featured_2_cat . '&showposts=3');
$count = 0;
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
<!-- displays the featured2 posts -->
<!-- gives the posts individual numbers between 1-3 for styling -->
<?php $count++; if($count > 3) { $count = 1; } ?>
<div class="box_third margin_top_25<?php if($count == 3) { echo " last"; } ?>" id="post-<?php the_ID(); ?>">
<h4><a href="<?php if(get_field('external_link_value') != NULL) {_e(get_field('external_link_value'));} else{the_permalink();} ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
<div class="mag"><!-- magnifying glass div -->
<?php if(get_field('fullsize_value') != NULL){ ?><a href="<?php echo get_field('fullsize_value'); ?>" rel="prettyphoto" title="<?php the_title_attribute(); ?>"><?php } else { ?><a class="noimage" href="<?php if(get_field('external_link_value') != NULL) {echo get_field('external_link_value');} else{the_permalink();} ?>" title="<?php the_title_attribute(); ?>"><?php } ?><?php if(get_field('large_image_value') != NULL){ ?><div style="width:300px;height:120px;overflow:hidden;"><img style="object-fit:cover;width:100%;height:100%;" src="<?php echo get_field('large_image_value') ?>" alt="<?php the_title(); ?>" /></div><?php } ?></a>
</div><!-- end magnifying glass div -->
<?php global $more; $more = false; ?>
<?php if (!empty($post->post_excerpt)) : ?>
<?php the_excerpt(''); ?>
<?php else : ?>
<?php the_content('<span><!--:it-->Leggi tutto<!--:--><!--:en-->Continue Reading</span><!--:-->'); ?>
<?php endif; ?>
<?php $more = true; ?>
</div>
<!-- end featured2 post display -->
<?php endwhile; $wp_query = null; $wp_query = $temp; ?>
<!-- FEATURED2 POSTS END -->
<div class="clear"></div>
<?php } ?>
<?php $show_homepage_headline = get_option('bb_show_homepage_headline');
if($show_homepage_headline != 'no') {
?>
<!-- HOMEPAGE HEADLINE BEGIN -->
<div class="bar mt15 mb15"></div>
<div class="round">
<div class="float_l mt10" style="padding-left:90px;"><img src="<?php echo get_template_directory_uri(); ?>/images/flourish_left.png" alt="flourish" /></div><div class="float_r mt10" style="padding-right:90px;"><img src="<?php echo get_template_directory_uri(); ?>/images/flourish_right.png" alt="flourish" /></div><h4><?php $homepage_headline = get_option('bb_homepage_headline'); if($homepage_headline != NULL) {echo $homepage_headline;} else {echo 'You can expect a theme crafted with attention to detail and studio polish.';} ?></h4>
</div>
<div class="bar mt5 mb15"></div>
<!-- HOMEPAGE HEADLINE END -->
<?php } ?>
<?php $show_carousel = get_option('bb_show_carousel');
if($show_carousel != 'no') {
?>
<!-- CAROUSEL BEGIN -->
<div class="carousel_container">
<a class="prev"></a>
<div class="carousel">
<ul>
<?php
$carousel_cat = get_option('bb_carousel_cat');
if($carousel_cat == NULL || $carousel_cat == 'Choose a category') {$carousel_cat = 'Carousel';}
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query('category_name=' . $carousel_cat . '&showposts=12');
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
<li><a href="<?php if(get_field('external_link_value') != NULL) {echo get_field('external_link_value');} else{the_permalink();} ?>" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php if(get_field('large_image_value') != NULL) {echo get_field('large_image_value', $single = true);} else {echo get_field('fullsize_value', $single = true);} ?>&h=60&w=115&zc=1" alt="<?php the_title(); ?>" /></a></li>
<!-- end carousel post display -->
<?php endwhile; $wp_query = null; $wp_query = $temp; ?>
</ul>
</div>
<a class="next"></a>
<div class="clear"></div>
</div><!-- end div.carousel_container -->
<!-- CAROUSEL END -->
<?php } ?>
</div><!-- end div.entry -->
</div><!-- end div.entries -->
<div class="clear"></div>
</div><!-- end div#main -->
<div class="clear"></div>
</div><!-- end div#main_container-->
<!-- footer -->
<?php include('footer.php'); ?>