-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-project.php
More file actions
60 lines (59 loc) · 2.63 KB
/
single-project.php
File metadata and controls
60 lines (59 loc) · 2.63 KB
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
52
53
54
55
56
57
58
59
60
<?php while (have_posts()) : the_post(); ?>
<article <?php post_class(); ?>>
<div class="row ps projectheadrow">
<div class="columns medium-10 large-8">
<header class="pageheader fadeInUp wow">
<a href="<?= the_permalink(45); ?>" class="backtowork">
<i class="icon icon--times"></i>
</a>
<h1 class="pageheader__title"><?php the_title(); ?></h1>
</header>
<div class="projectcontent fadeInUp wow" data-wow-delay="125ms" data-wow-duration="875ms">
<?php the_content(); ?>
</div>
<footer class="fadeInUp wow" data-wow-delay="1250ms" data-wow-duration="500ms">
<nav class="projectnav">
<?php
/**
* Infinite next and previous post looping in WordPress
*/
if( get_adjacent_post(false, '', true) ) {
previous_post_link('%link', '<i class="icon icon--chevron-left"></i> %title', FALSE);
} else {
$first = new WP_Query('post_type=project&posts_per_page=1&order=DESC'); $first->the_post();
echo '<a href="' . get_permalink() . '" rel="prev"><i class="icon icon--chevron-left"></i> '.get_the_title().'</a>';
wp_reset_query();
};
echo " | ";
if( get_adjacent_post(false, '', false) ) {
next_post_link('%link', '%title <i class="icon icon--chevron-right"></i>', FALSE);
} else {
$last = new WP_Query('post_type=project&posts_per_page=1&order=ASC'); $last->the_post();
echo '<a href="' . get_permalink() . '" rel="next">'.get_the_title().' <i class="icon icon--chevron-right"></i></a>';
wp_reset_query();
};
?>
</nav>
</footer>
</div>
</div>
<?php
$the_gallery = get_field('gallery');
if( $the_gallery ): ?>
<div class="row expanded collapse fadeInUp wow" data-wow-delay="500ms" data-wow-duration="750ms">
<div class="columns">
<aside id="projectcarousel" class="projectcarousel owl-carousel" data-magellan-target="projectcarousel">
<?php foreach( $the_gallery as $image ): ?>
<div class="item">
<a class="popimg" href="<?= $image['url']; ?>" title="<?php the_title(); ?>">
<?= wp_get_attachment_image($image['id'], 'large' ); ?>
</a>
</div>
<?php endforeach; ?>
</aside>
</div>
</div>
<?php endif; ?>
</article>
<?php endwhile; ?>
<?php get_template_part('templates/project','keyboard'); ?>