Created
May 2, 2013 03:25
-
-
Save media317/5499971 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The custom Projects post type single post template | |
*/ | |
/** Remove standard Genesis Loop */ | |
remove_action( 'genesis_loop' , 'genesis_do_loop' ); | |
/** Add custom loop for Portfolio page */ | |
add_action( 'genesis_loop', 'me_portfolio' ); | |
function me_portfolio() { | |
global $post; | |
$one = genesis_get_custom_field('project_one'); | |
$two = genesis_get_custom_field('project_two'); | |
$three = genesis_get_custom_field('project_three'); | |
$four = genesis_get_custom_field('project_four'); | |
$five = genesis_get_custom_field('project_five'); | |
$six = genesis_get_custom_field('project_six'); | |
$seven = genesis_get_custom_field('project_seven'); | |
$mainimage = genesis_get_custom_field('main_project_img'); | |
$maintitle = genesis_get_custom_field('main_project_title'); | |
$maindetails = genesis_get_custom_field('main_project_details'); | |
$cattitle = genesis_get_custom_field( 'category_project_title' ); | |
$fispotimg = genesis_get_custom_field ( 'first_project_image' ); | |
$fispotdesc = genesis_get_custom_field ( 'first_project_spotlight_details' ); | |
$secspotimg = genesis_get_custom_field ( 'second_project_image' ); | |
$secspotdesc = genesis_get_custom_field ( 'second_project_spotlight_details' ); | |
$thspotimg = genesis_get_custom_field ( 'third_project_image' ); | |
$thspotdesc = genesis_get_custom_field ( 'third_project_spotlight_details' ); | |
?> | |
<div class="page hentry"> | |
<h1 class="entry-title"><?php echo the_title(); ?></h1> | |
<?php while (have_posts()) : the_post(); ?> | |
<div class="entry-content"><?php the_content(); ?></div> | |
<?php endwhile; ?> | |
<div class="project-top"> | |
<div class="wrap"> | |
<div class="project-featured"> | |
<div class="project-featured-img"><img src="<?php echo $mainimage ?>" alt="<?php echo $cattitle ?>" /></div> | |
<div class="project-main"> | |
<h2 class="project-main-title"><?php echo $maintitle ?></h2> | |
<div class="project-main-des"><?php echo $maindetails ?></div> | |
</div> | |
</div> | |
<div class="project-details"> | |
<h2 class="cat-title"><?php echo $cattitle ?></h2> | |
<ul class="project-list"> | |
<?php if($one) : ?> | |
<li class="service-design"><?php echo $one; ?></li> | |
<?php endif; ?> | |
<?php if($two) : ?> | |
<li class="service-design"><?php echo $two; ?></li> | |
<?php endif; ?> | |
<?php if($three) : ?> | |
<li class="service-design"><?php echo $three; ?></li> | |
<?php endif; ?> | |
<?php if($four) : ?> | |
<li class="service-design"><?php echo $four; ?></li> | |
<?php endif; ?> | |
<?php if($five) : ?> | |
<li class="service-design"><?php echo $five; ?></li> | |
<?php endif; ?> | |
<?php if($six) : ?> | |
<li class="service-design"><?php echo $six; ?></li> | |
<?php endif; ?> | |
<?php if($seven) : ?> | |
<li class="service-design"><?php echo $seven; ?></li> | |
<?php endif; ?> | |
</ul> | |
</div><!-- end .project-details --> | |
</div><!-- end .wrap --> | |
</div><!-- end .project-top --> | |
<div class="project-bottom"> | |
<div class="wrap"> | |
<div class="project-spotlight-1"> | |
<div class="spotlight-1"> | |
<img src="<?php echo $fispotimg ?>" alt="<?php echo $cattitle ?>" /> | |
<?php echo $fispotdesc ?> | |
</div> | |
</div> | |
<div class="project-spotlight-2"> | |
<div class="spotlight-2"> | |
<img src="<?php echo $secspotimg ?>" alt="<?php echo $cattitle ?>" /> | |
<?php echo $secspotdesc ?> | |
</div> | |
</div> | |
<div class="project-spotlight-3"> | |
<div class="spotlight-3"> | |
<img src="<?php echo $thspotimg ?>" alt="<?php echo $cattitle ?>" /> | |
<?php echo $thspotdesc ?> | |
</div> | |
</div> | |
</div><!-- end .wrap --> | |
</div><!-- end .project-bottom --> | |
<?php | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment