File: /home/slyfwmm/foar/wp-content/themes/flexfit/page-home.php
<?php
/*
Template Name: Home
*/
?>
<?php get_header(); ?>
<div id="home-slider" class="flexslider">
<ul class="slides">
<?php $args = array( 'post_type' => 'home_slider', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li class="<?php if( get_post_meta( get_the_ID(), 'minti_slidelayout', true ) == "option1" ) { echo 'option1'; }
else if( get_post_meta( get_the_ID(), 'minti_slidelayout', true ) == "option2" ) { echo 'option2'; }
else if( get_post_meta( get_the_ID(), 'minti_slidelayout', true ) == "option3" ) { echo 'option3'; }
else if( get_post_meta( get_the_ID(), 'minti_slidelayout', true ) == "option4" ) { echo 'option4'; }
else if( get_post_meta( get_the_ID(), 'minti_slidelayout', true ) == "option5" ) { echo 'option5'; }
else if( get_post_meta( get_the_ID(), 'minti_slidelayout', true ) == "option6" ) { echo 'option6'; }
else if( get_post_meta( get_the_ID(), 'minti_slidelayout', true ) == "option7" ) { echo 'option7'; }
?>">
<div class="slide-image">
<?php the_post_thumbnail('home-slider'); ?></div>
<div class="slide-caption <?php if (get_post_meta( get_the_ID(), 'minti_slideskin', true ) == 'option1' ) { echo 'dark'; } else { echo 'light'; } ?>">
<div class="custom-table">
<div class="custom-table-cell">
<div class="slide-title"><?php the_title(); ?></div>
<div class="slide-content"><?php the_content(); ?></div>
<div class="slide-shortcontent"><?php echo apply_filters('the_content', get_post_meta($post->ID, 'minti_slide_shortdescription', true)); ?></div>
</div>
</div>
</div>
</li>
<?php endwhile; ?>
</ul>
</div>
<div class="clear"></div>
<div id="page" class="clearfix">
<!-- Content -->
<div id="content">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="post clearfix">
<?php the_content(); ?>
</div>
<?php endwhile; ?>
</div>
<?php if(of_get_option('latestwork_checkbox') == true ) { ?>
<!-- Latest Portfolio Items -->
<div class="hr4"><span class="seperator"></span><span class="lightborder"></span></div>
<div id="latestwork" class="clearfix">
<div class="teasertext">
<img src="http://www.foar.it/wp-content/uploads/notizie-avvisi-2.png" alt="NOTIZIE" />
<!--<h2 class="highlight"><?php _e('NOTIZIE', 'framework'); ?></h2>
<?php echo of_get_option('latestwork_text'); ?>-->
<!--<div class="carousel-nav clearfix">
<a href="#" class="work-carousel-prev" onclick="return false;">prev</a>
<a href="#" class="work-carousel-next" onclick="return false;">next</a>
</div>-->
</div>
<div class="work-carousel">
<ul>
<?php
$query = new WP_Query();
$query->query('post_type=project&posts_per_page=3');
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post();
$site= get_post_custom_values('project_Link');
$shortDesc = get_post_custom_values('project_Desc');
$project_image1 = get_post_custom_values('project_image1');
?>
<li>
<div class="entry">
<?php if ( has_post_thumbnail()) { ?>
<?php if( get_post_meta( get_the_ID(), 'minti_lightbox', true ) == "yes" AND get_post_meta( get_the_ID(), 'minti_embed', true ) != "") { ?>
<?php if ( get_post_meta( get_the_ID(), 'minti_source', true ) == 'youtube' ) { ?>
<a href="http://www.youtube.com/watch?v=<?php echo get_post_meta( get_the_ID(), 'minti_embed', true ); ?>" class="prettyPhoto" title="<?php the_title(); ?>">
<?php the_post_thumbnail('work-thumb'); ?>
</a>
<?php } else if ( get_post_meta( get_the_ID(), 'minti_source', true ) == 'vimeo' ) { ?>
<a href="http://vimeo.com/<?php echo get_post_meta( get_the_ID(), 'minti_embed', true ); ?>" class="prettyPhoto" title="<?php the_title(); ?>">
<?php the_post_thumbnail('work-thumb'); ?>
</a>
<?php } else if ( get_post_meta( get_the_ID(), 'minti_source', true ) == 'own' ) { ?>
<a href="#embedd-video" class="prettyPhoto" title="<?php the_title(); ?>">
<?php the_post_thumbnail('work-thumb'); ?>
</a>
<div id="embedd-video">
<p><?php echo get_post_meta( get_the_ID(), 'minti_embed', true ); ?></p>
</div>
<?php } ?>
<?php } else if ( get_post_meta( get_the_ID(), 'minti_lightbox', true ) == "yes" AND get_post_meta( get_the_ID(), 'minti_embed', true ) == "") { ?>
<a href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" class="prettyPhoto" title="<?php the_title(); ?>">
<?php the_post_thumbnail('work-thumb'); ?>
</a>
<?php } else { ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="nolightbox">
<?php the_post_thumbnail('work-thumb'); ?>
</a>
<?php } ?>
<?php } ?>
<div class="work-description">
<h4><a href="<?php the_permalink() ?>"><?php the_title(); ?><i class="work-subtitle"><?php echo get_post_meta( get_the_ID(), 'minti_description', true ); ?></i></a></h4>
<span class="corner"></span>
</div>
</div>
</li>
<?php endwhile; endif; ?>
</ul>
</div>
<div class="clear"></div>
</div>
<?php } ?>
<?php if(of_get_option('latestposts_checkbox') == true ) { ?>
<!-- Latest Posts -->
<div class="hr4"><span class="seperator"></span><span class="lightborder"></span></div>
<div id="latestposts" class="clearfix">
<div class="teasertext">
<h2><?php _e('Recent Updates', 'framework'); ?></h2>
<?php echo of_get_option('latestposts_text'); ?>
<div class="carousel-nav clearfix">
<a href="#" class="post-carousel-prev" onclick="return false;">prev</a>
<a href="#" class="post-carousel-next" onclick="return false;">next</a>
</div>
</div>
<div class="post-carousel">
<ul>
<?php
$args = array( 'numberposts' => 3, 'order'=> 'DESC', 'orderby' => 'date' );
$postslist = get_posts( $args );
foreach ($postslist as $post) : setup_postdata($post); ?>
<li>
<div class="entry">
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<div class="date"><?php the_time('m/d/Y'); ?></div>
<div class="content"><?php wpe_excerpt('wpe_excerptlength_index', 'wpe_excerptmore'); ?></div>
<div class="decoration"></div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php } ?>
</div>
<?php get_footer(); ?>