File: /home/awaldron/_domains/waldroninteractive.com/wp-content/themes/whoiam/portfolio_section.php
<?php global $smof_data;
global $root, $post_id;
$portfolio_filters = get_terms('portfolio_filter');
?>
<?php ?>
<?php
// $temp = $wp_query;
global $wp_query;
$paged = get_query_var('page') ? get_query_var('page') : 1;
$port_args = array(
'post_type' => 'portfolio',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'DESC',
'paged' => $paged
);
$wp_query = new WP_Query($port_args);
if( have_posts() ) : ?>
<div class="block-page" >
<div class="container-medium clearfix">
<div class="row list-work">
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
<?php $terms = get_the_terms( get_the_ID(), 'portfolio_filter' ); ?>
<div class="<?php if($terms) : foreach ($terms as $term) { echo 'item portfolio-category-'.$term->slug.' '; } endif; ?>" data-animated="0">
<?php
$att=get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $att, 'span5' );
$image_src = $image_src[0]; ?>
<?php
$taxonomy = strip_tags( get_the_term_list($post->ID, 'portfolio_filter', '', ', ', '') );
$port_gallery = get_post_meta( get_the_ID( ), 'rnr_project_item_slides', false );
if( get_post_meta( get_the_ID(), 'rnr_project_video_embed12', true ) != "") {
$lightboxtype = '<div class="thumb-info"></i><h3>'. get_the_title() .'</h3><p class="portfolio-tags">'.$taxonomy.'</p></div>';
}
else if(!empty($port_gallery12)) {
$lightboxtype = '<div class="thumb-info"><h3>'. get_the_title() .'</h3><p class="portfolio-tags">'.$taxonomy.'</p></div>';
}
else{
$lightboxtype = '
<div class="hover">
<div class="link-btns">
<a href="'.$image_src.'" title="pic 02" class="galery-item" ><i class="fa fa-search-plus"></i></a>
<a href="' .get_permalink().'"><i class="fa fa-link"></i></a>
</div>
<a href="' .get_permalink().'" class="project-title">'. get_the_title() .'</a>
</div>
';
}
if($smof_data['rnr_disable_portfolio_ajax']==true) {
$link = '<a href="' .get_permalink().'" title="'. get_the_title() .'" class="image">';
} else {
$link = '
<div class="col-md-'.ot_get_option( 'portfolio_select' ).' col-sm-6"><div class="box-work"><div class="work-preview">';
}
?>
<?php
// IF PORTFOLIO TYPE IS IMAGE
if ( has_post_thumbnail()) { ?>
<?php echo $link;
$att=get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $att, 'span4' );
$image_src = $image_src[0]; ?>
<img src="<?php echo $image_src; ?>" width="337" height="200"/><?php echo $lightboxtype; ?></div></div></div>
<?php } ?>
</div>
<?php
endwhile; ?>
<?php endif; ?>
</div> </div></div>
<?php wp_reset_query(); ?>