File: /home/awaldron/_domains/waldroninteractive.com/wp-content/themes/whoiam/single-portfolio.php
<?php
/**
* Single-portfolio.php
* @package WordPress
* @subpackage Who I Am
* @since Who I Am 1.9
*/
?>
<?php get_header(); ?>
<?php get_template_part('menu_section'); ?>
<!-- ***************************************
Start of BreadCrumbs
*************************************** -->
<section class="block-section">
<!-- TITLE PAGE -->
<div class=" shape-bottom">
<div class="bg-secondary block-title">
<div class="container">
<h2 class="text-uppercase color-dark text-bold no-margin"><?php the_title(); ?></h2>
<div class="title-icon"> <i class="fa fa-inbox"></i> </div>
</div>
</div>
</div><!-- END TITLE PAGE -->
<?php
if (have_posts()) : while (have_posts()) : the_post();
global $post;
$post_name = $post->post_name;
$post_id = get_the_ID();
?>
<div class="block-page" >
<div class="container-medium clearfix">
<div class="carousel-inner" role="listbox">
<div class="item active">
<?php
$slider_meta = get_post_meta( get_the_ID( ), 'rnr_project_item_slides', false );
if(!empty($slider_meta)) { ?>
<section class="slider">
<div class="flexslider">
<ul class="slides">
<?php global $wpdb, $post;
if ( !is_array( $slider_meta ) )
$slider_meta = ( array ) $slider_meta;
if ( !empty( $slider_meta ) ) {
$slider_meta = implode( ',', $slider_meta );
$images = $wpdb->get_col( "
SELECT ID FROM $wpdb->posts
WHERE post_type = 'attachment'
AND ID IN ( $slider_meta )
ORDER BY menu_order ASC
" );
foreach ( $images as $att ) {
// Get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes
$image_src = wp_get_attachment_image_src( $att, 'full' );
$image_src2= wp_get_attachment_image_src( $att, '');
$image_src = $image_src[0];
$image_src2 = $image_src2[0];
// Show image
echo "<li><img src='{$image_src}' /></li>";
}
} ?>
</ul>
</div>
</section><!-- end of portfolio slider -->
<?php
} else if(get_post_meta(get_the_ID(), 'rnr_project_video_embed', true)!='') {
if (get_post_meta( get_the_ID(), 'rnr_project_video_type', true ) == 'vimeo') {
echo '<iframe src="http://player.vimeo.com/video/'.get_post_meta( get_the_ID(), 'rnr_project_video_embed', true ).'?title=0&byline=0&portrait=0&color=ffffff" width="960" height="540" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
}
else if (get_post_meta( get_the_ID(), 'rnr_project_video_type', true ) == 'youtube') {
echo '<iframe width="960" height="540" src="http://www.youtube.com/embed/'.get_post_meta( get_the_ID(), 'rnr_project_video_embed', true ).'?rel=0&showinfo=0&modestbranding=1&hd=1&autohide=1&color=white" frameborder="0" allowfullscreen></iframe>';
}
} else if(get_post_meta(get_the_ID(), 'rnr_projectaudiourl', true)!='') {
echo '<div id="portfolio-video">'.get_post_meta(get_the_ID(), 'rnr_projectaudiourl', true).'</div>';
} else {
$att=get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $att, 'full' );
$image_src = $image_src[0];
?>
<?php the_post_thumbnail('full'); ?>
<?php } ?>
</div>
</div>
<div class="white-space-30"></div>
<div class="row">
<div class="col-sm-12">
<h3 class="text-uppercase color-dark text-bold"><?php the_title(); ?></h3>
<div class="white-space-10"></div>
<?php the_content(); ?>
<div class="white-space-20"></div>
<div class="white-space-20"></div>
</div>
</div>
</div>
</div>
</div>
<?php
endwhile;
endif;
wp_reset_query();
?>
<?php get_footer(); ?>