Created
July 31, 2014 15:13
-
-
Save anonymous/d1dd58ee07cba7d9a2ce 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 get_header(); ?> | |
<div id="projects"> | |
<?php $thumbnailid = get_post_thumbnail_id($post->ID); ?> | |
<?php $images = get_children( | |
array( | |
'post_parent' => $post->ID, | |
'post_status' => 'inherit', | |
'post_type' => 'attachment', | |
'post_mime_type' => 'image', | |
'order' => 'ASC', | |
'orderby' => 'menu_order' | |
) | |
); | |
?> | |
<ul id="slider"> | |
<?php | |
if ( $images ) { | |
foreach ( $images as $id => $image ) { | |
$imgURL = wp_get_attachment_image_src( $image->ID , array('445' ,'332') ); | |
if($thumbnailid == $image->ID) continue; | |
?> | |
<li><img src="<?php echo $imgURL[0]; ?>" alt="" /></li> | |
<?php } } ?> | |
</ul> | |
<?php if(have_posts()) : while(have_posts()) : the_post(); ?> | |
<div id="project-desc"> | |
<h2><?php the_title(); ?></h2> | |
<?php if (get_field('location')) : ?> <span>Location: <?php echo get_field('location'); ?></span><?php endif; ?> | |
<?php if (get_field('square_footage')) : ?><span>Square Footage: <?php echo get_field('square_footage'); ?> </span><?php endif; ?> | |
<?php if (get_field('completion_date')) : ?><span>Completion date: <?php echo get_field('completion_date'); ?></span><?php endif; ?> | |
<?php if (get_field('architect')) : ?><span>Architect: <?php echo get_field('architect'); ?> </span> <?php endif; ?> | |
<?php if (get_field('owner')) : ?><span>Owner: <?php echo get_field('owner'); ?> </span> <?php endif; ?> | |
<!-- <strong>Project description: </strong><?php the_content(); ?> --> | |
</div> | |
<?php endwhile; endif; wp_reset_query(); ?> | |
<h3><a href="<?php echo get_permalink(169); ?>">Back to Projects</a></h3> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php get_footer(); ?> | |
<script src="<?php bloginfo('template_url'); ?>/js/main.js" type="text/javascript"></script> | |
<script src="<?php bloginfo('template_url'); ?>/js/jquery.bxSlider.js" type="text/javascript"></script> | |
<script src="<?php bloginfo('template_url'); ?>/js/jquery.easing.1.3.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
jQuery(function(){ | |
jQuery('#slider').bxSlider({ | |
mode: 'fade', | |
easing:'swing', | |
speed:1000, | |
captions: false, | |
pager:true, | |
auto: true, | |
controls: false | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment