Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <section class="page-title">
- <div class="double-separator"></div>
- <div class="breadcrumbs">
- <div class="two-third align-left">
- <?php if (function_exists('dt_breadcrumbs')) dt_breadcrumbs(); ?>
- </div>
- <div class="one-third column-last align-right">
- <div class="single-portfolio-nav" class="clearfix">
- <div class="previous-post-link"><?php previous_post_link('%link'); ?></div>
- <div class="next-post-link"><?php next_post_link('%link'); ?></div>
- </div>
- </div>
- </div><!--end breadcrumbs-->
- <div class="double-separator"></div>
- </section>
- </div><!--end top-->
- <div class="centered-wrapper">
- <?php
- //get meta
- $portfolio_date = get_post_meta($post->ID, 'haze_portfolio_date', TRUE);
- $portfolio_location = get_post_meta($post->ID, 'haze_portfolio_location', TRUE);
- $portfolio_camera = get_post_meta($post->ID, 'haze_portfolio_camera', TRUE);
- $portfolio_website = get_post_meta($post->ID, 'haze_portfolio_website', TRUE);
- $portfolio_url = get_post_meta($post->ID, 'haze_portfolio_url', TRUE);
- $portfolio_desc = get_post_meta($post->ID, 'haze_portfolio_desc', TRUE);
- ?>
- <section class="portfolio-single">
- <div class="percent-three-fourth">
- <div id="container-slides">
- <div id="slides">
- <div class="slides_container">
- <?php
- //get attachment count
- $get_attachments = get_children( array( 'post_parent' => $post->ID ) );
- $attachments_count = count( $get_attachments );
- //attachment loop
- $args = array(
- 'post_type' => 'attachment',
- 'orderby' => 'menu_order',
- 'post_status' => null,
- 'post_parent' => get_the_ID(),
- 'post_mime_type' => 'image',
- 'posts_per_page' => -1
- );
- $attachments = get_posts($args);
- //start loop
- foreach ($attachments as $attachment) :
- //get images
- $full_img = wp_get_attachment_image_src( $attachment->ID, 'full-size');
- $portfolio_single = wp_get_attachment_image_src( $attachment->ID, 'portfolio-single');
- ?>
- <div class="slide">
- <a href="<?php echo $full_img[0]; ?>" title="<?php echo apply_filters('the_title', $attachment->post_title); ?>" <?php if($attachments_count =='1') { echo 'rel="prettyPhoto"'; } else { echo 'rel="prettyPhoto[pp_gal]"'; } ?>>
- <img src="<?php echo $portfolio_single[0]; ?>" width="<?php echo $portfolio_single[1]; ?>" height="<?php echo $portfolio_single[2]; ?>" alt="<?php echo apply_filters('the_title', $attachment->post_title); ?>" />
- </a>
- </div>
- <?php endforeach;?>
- </div><!--end slides_container-->
- <a href="#" class="prev"><img src="<?php echo get_template_directory_uri(); ?>/images/light-arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
- <a href="#" class="next"><img src="<?php echo get_template_directory_uri(); ?>/images/light-arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
- </div><!--end slides-->
- </div><!--end container-slides-->
- </div><!--end three-fourth-->
- <div class="percent-one-fourth column-last">
- <h2><?php the_title(); ?></h2>
- <?php if(!empty($portfolio_desc)) { echo $portfolio_desc; } ?>
- <ul class="item-details">
- <?php if(!empty($portfolio_date)) {?><li><span><?php _e('Date','haze'); ?>: </span><?php echo $portfolio_date; ?></li><?php } ?>
- <?php if(!empty($portfolio_location)) {?><li><span><?php _e('Location','haze'); ?>: </span><?php echo $portfolio_location; ?></li><?php } ?>
- <?php if(!empty($portfolio_camera)) {?><li><span><?php _e('Camera','haze'); ?>: </span><?php echo $portfolio_camera; ?></li><?php } ?>
- <?php if(!empty($portfolio_website)) {?><li><span><?php _e('Website','haze'); ?>: </span><a href="<?php echo $portfolio_url; ?>"><?php echo $portfolio_website; ?></a></li><?php } ?>
- </ul><!--end item-details-->
- </div><!--end one-third-->
- </section><!--end portfolio-single-->
- <div class="space"></div>
- <div class="clear"></div>
- <?php the_content(); ?>
- <div class="separator"></div>
- <?php get_template_part( 'includes/related-portfolio-posts'); ?>
- <?php endwhile; endif; ?>
- </div><!--end centered-wrapper-->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement