File: /home/slyfwmm/foar/wp-content/themes/flexfit/page-project-3cols.php
<?php
/*
Template Name: Projects: 3 Columns
*/
?>
<?php get_header(); ?>
<div id="page" class="border-top clearfix">
<div id="subtitle">
<h1><?php the_title(); ?></h1>
<ul id="filters" class="clearfix">
<li><a href="#" data-filter="*" class="active"><?php _e('Show All', 'framework'); ?></a></li>
<?php wp_list_categories(array('title_li' => '', 'taxonomy' => 'filters', 'walker' => new Works_Walker())); ?>
</ul>
<div class="hr4"><span class="seperator"></span><span class="lightborder"></span></div>
</div>
<div id="content-full" class="clearfix">
<div id="container">
<?php $args = array( 'post_type' => 'project', 'posts_per_page' => 150 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php $terms = get_the_terms( get_the_ID(), 'filters' ); ?>
<div class="<?php if($terms) : foreach ($terms as $term) { echo 'term'.$term->term_id.' '; } endif; ?>">
<div class="work-item col3">
<?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-col3'); ?>
</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-col3'); ?>
</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-col3'); ?>
</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-col3'); ?>
</a>
<?php } else { ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="nolightbox">
<?php the_post_thumbnail('work-thumb-col3'); ?>
</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>
</div> <!-- end of terms -->
<?php endwhile; ?>
</div>
</div>
</div>
<?php get_footer(); ?>