<?php

/*

 *

 Template Name: Portfolio Three Column

 * 

 * This template is used to display the three-column portfolio page. 

 *

 */ 

 get_header(); ?>





	    

	         

	            

	

	         



<?php if ( has_post_thumbnail()) { ?>

	<div class="row">

		<div id="banner"><?php the_post_thumbnail( 'banner' ); ?></div>

	</div>

   

<?php } else { } ?>



         

	           



<!-- #content -->

<div id="content">



 

	

	<!-- .row -->

	<div class="row portfolio">







		<!-- BEGIN .hentry -->

		<div <?php post_class(); ?> id="page-<?php the_ID(); ?>">

		        

		     <h1 class="headline"><?php the_title(); ?></h1>



<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

 <?php the_content(); ?>

	 <?php endwhile; else: ?>

<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>

<?php endif; ?> 

		        

		    <?php $wp_query = new WP_Query(array('cat'=>of_get_option('categories_portfolio_three'),'showposts'=>of_get_option('postnumber_portfolio_three'), 'paged'=>$paged)); ?>

			<?php $post_class = 'first'; ?>

			<?php if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); ?>

			<?php $meta_box = get_post_custom($post->ID); $video = $meta_box['custom_meta_video'][0]; ?>

			<?php global $more; $more = 0; ?>

		

			<!-- BEGIN .four columns -->

		   	<div class="four columns <?php echo $post_class; ?>">

		

				<!-- BEGIN .portfolio-item -->

				<div class="portfolio-item">

		            

		            <?php

		                if ('first' == $post_class){

		                  $post_class = 'second';

		                }elseif ('second' == $post_class){

		                  $post_class = 'third';

		                }else{

		                  $post_class = 'first';

		                }

		            ?>

		

		            <?php if ( $video ) : ?>

		                <div class="feature_vid"><?php echo $video; ?></div>

		           <?php else: ?>

		        			<div class="feature_img"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'portfolio-medium' ); ?></a></div>

		    		<?php endif; ?>

		            

		            <?php if(of_get_option('display_portfolio_page_info') == '1') { ?>

		                <div class="information">              

		                    <h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

		                    <?php the_excerpt(); ?>

		                </div><!-- information -->

		            <?php } else { ?>

		            <?php } ?>

		

				<!-- END .portfolio-item -->

				</div>

		            

			<!-- END .four columns -->

		    </div>

		                            

			<?php endwhile; ?>

		

			<div class="pagination">

				<?php if (function_exists("number_paginate")) { number_paginate(); } ?>

			</div>

		

			<?php else : // do not delete ?>

		

			<div class="twelve columns">

			

				<div class="article">

					<h1 class="headline"><?php _e("No Posts Found", 'organicthemes'); ?></h1>

					<p><?php _e("We're sorry, but no posts were found for this category.", 'organicthemes'); ?></p>

					<p><?php _e("Try searching for the page you are looking for or using the navigation in the header or sidebar.", 'organicthemes'); ?></p>

				</div>

				

			</div><!-- .twelve columns -->

		

		    <?php endif; // do not delete ?>

	    

	    <!-- END .hentry -->

	    </div>



	<!-- .row -->

	</div>



<!-- #content -->	

</div>



<?php get_footer(); ?>