/
single-portfolio.php
51 lines (38 loc) · 1.74 KB
/
single-portfolio.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php get_header(); ?> <!-- single portfolio piece -->
<div class="main clearfix">
<div class="container">
<div class="content">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php the_terms( $post->ID, 'technology', '', '-'); ?>
<div class="entry-content">
<?php the_field('portfolio_technologies_used') ?>
<?php the_field('portfolio_short_desc') ?>
<?php the_content(); ?>
<div class="gallery">
<?php while(has_sub_field('portfolio_gallery')): ?>
<div class="gallery-item">
<?php $image = get_sub_field('image') ?>
<?php $image_src = $image['sizes']['medium'] ?>
<img src="<?php echo $image_src ?>" alt="">
<p><?php the_sub_field('caption') ?></p>
</div>
<?php endwhile; ?>
</div>
<?php wp_link_pages(array(
'before' => '<div class="page-link"> Pages: ',
'after' => '</div>'
)); ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<p class="nav-previous"><?php previous_post_link('%link', '← %title'); ?></p>
<p class="nav-next"><?php next_post_link('%link', '%title →'); ?></p>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div> <!-- /.content -->
</div> <!-- /.container -->
</div> <!-- /.main -->
<?php get_footer(); ?>