Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
BIR single-portfolio.php
<?php
global $at_options;
get_header(); ?>
<?php
if(have_posts()) : while(have_posts()) : the_post();
$page_meta = get_post_meta($post->ID,'page_meta',true);
$portfolio_meta = get_post_meta($post->ID,'portfolio_meta',true);
$images = get_post_meta($post->ID,'portfolio_images',true);
$terms = get_the_terms( $post->ID, 'categoryportfolio' );
$cats = '';
if(!empty($terms)){
foreach ($terms as $term) {
$cats .= strtolower(str_replace(' ', '-',$term->name)) . ' ';
}
}
?>
<!-- HEADER TEXT -->
<div class="container header_text">
<a href="<?php echo $at_options['portfolio-page']; ?>" class="main-btn"><span class="icon-caret-left"></span><?php _e('Back to portfolio','at'); ?></a>
</div>
<!-- end: HEADER TEXT -->
<div class="divider"></div>
<!-- PROJECT CONTAINER -->
<div class="container project_cnt">
<?php if(is_array($images) && count($images) > 1) { ?>
<div id="slides">
<?php foreach ($images as $image) { ?>
<?php if($image!='') { ?>
<img src="<?php echo $image; ?>" alt="" />
<?php } ?>
<?php } ?>
</div>
<?php } elseif(count($images)==1 && !empty($images[0])) { ?>
<div class="image-project">
<img src="<?php echo $images[0]; ?>" alt="" />
</div>
<?php } ?>
<div class="project-infos">
<div class="project-info-left">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
<div class="project-info-right">
<p><span class="icon-folder-open"><em><?php echo $cats; ?></em></span></p>
<?php if(isset($portfolio_meta ['author']) && $portfolio_meta ['author']!=''){ ?>
<p><span class="icon-user"><em><?php echo $portfolio_meta ['author']; ?></em></span></p>
<?php } ?>
<?php if(isset($portfolio_meta ['date']) && $portfolio_meta ['date']!=''){ ?>
<p><span class="icon-calendar"><em><?php echo $portfolio_meta ['date']; ?></em></span></p>
<?php } ?>
<?php if(isset($portfolio_meta ['link']) && $portfolio_meta ['link']!=''){ ?>
<p><span class="icon-link"><em><a href="<?php echo $portfolio_meta ['link']; ?>" target="_blank"><?php echo $portfolio_meta ['link']; ?></a></em></span></p>
<?php } ?>
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- end: PROJECT CONTAINER -->
<div class="divider"></div>
<?php endwhile; endif; ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.