Created
January 7, 2014 01:54
-
-
Save ericfode/8293474 to your computer and use it in GitHub Desktop.
This file contains 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 while (have_posts()) : the_post(); ?> | |
<?php $image=get_post_meta($post->ID, $key, true); ?> | |
<?php $video=get_post_meta($post->ID, $vkey, true); ?> | |
<?php $gallery=true; ?> | |
<?php if ($image!=="") { ?> | |
<?php $gallerydisplayed=true; $pcount++; ?> | |
<?php if ($pcount==1) { $portfolio_row_end=false; ?> | |
<div class="categoryportfoliowrap"> | |
<div class="portfoliobox"> | |
<?php } else { ?> | |
<div class="portfoliobox mportfoliospace"> | |
<?php } ?> | |
<!-- Lightbox and image hover --> | |
<?php if ($video<>"") { ?> | |
<div class="mportfolio mportfoliobgvideo"> | |
<?php } else { ?> | |
<div class="mportfolio mportfoliobg"> | |
<?php } ?> | |
<?php if ($video<>"") { ?> | |
<a class="lboxvideo" rel="studiolightbox" title="<?php the_title(); ?>" href="<?php echo $video; ?>"> | |
<?php } else { ?> | |
<a rel="studiollightbox" title="<?php the_title(); ?>" href="<?php echo $image; ?>"> | |
<?php } ?> | |
<img class="fade" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $image; ?>&h=<?php echo $pheight; ?>&w=<?php echo $pwidth; ?>&q=92&zc=1" alt="<?php the_title(); ?>" /> | |
</a> | |
</div> | |
<!-- Contents --> | |
<div class="portfoliotitle clear"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></div> | |
<div class="portfoliocontents"><?php echo substr(get_the_excerpt(), 0,75); ?></div> | |
</div> | |
<?php } ?> | |
<?php if ($pcount==3) { $portfolio_row_end=true; $pcount=0; ?> <div class="clear"></div></div> <?php } ?> | |
<?php endwhile; ?> | |
<?php if ($gallery<>false) { | |
if ($portfolio_row_end==false) { ?> | |
</div> | |
<?php } | |
} ?> | |
<div class="clear"></div> | |
<div class="pmarginbottom"></div> | |
<?php include (TEMPLATEPATH . "/includes/navigation.php"); ?> | |
<?php if ($gallerydisplayed==true) { //Sometimes a gallery can be empty ?> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment