-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsingle-work.php
More file actions
executable file
·119 lines (109 loc) · 3.19 KB
/
single-work.php
File metadata and controls
executable file
·119 lines (109 loc) · 3.19 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
get_header();
get_template_part('content', 'hero-image');
$project_type = get_field( 'project_type' );
$currentID = get_the_ID();
$args = array('post_type' => 'work', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page'=>2, 'exclude' => $currentID);
$random_posts = get_posts($args);
?>
<div class="box-secondary">
<div class="container">
<div class="row">
<?php
if ( have_posts() ) :
while ( have_posts() ):
the_post();
?>
<div class="col-md-3">
<div class="sidebar">
<?php $client_logo = get_field('client_logo');
if(!empty($client_logo)) { ?>
<img src = "<?php echo $client_logo; ?>" />
<?php } else {} ?>
<h5>Client</h5>
<p><?php the_field('client'); ?></p>
<h5>Project</h5>
<p><?php the_title(); ?></p>
<h5>Links</h5>
<?php the_field('url'); ?>
<?php foreach($project_type as $item): ?>
<button disabled class="btn <?php echo strtolower($item); ?>"><?php echo $item; ?></button>
<?php endforeach; ?>
</div>
</div>
<div class="col-md-9">
<div class="brief">
<?php the_content(); ?>
</div>
</div>
</div>
</div>
</div>
<div id="project-page">
<?php the_field('in_depth'); ?>
</div>
<div id="carousel" class="carousel">
<?php $images = get_post_meta($post->ID, 'slider', false);
$n=0;
foreach($images as $image): $n++;
?>
<div class="item<?php if($n==1) echo ' active' ?>">
<img src="<?php echo $image; ?>" />
</div>
<?php endforeach ?>
</div>
<div class="box-secondary">
<div class="container">
<div class="row">
<?php
$tests = get_field('testimonial');
$givers = get_field('testimonial_giver');
if (!empty( $tests) && !empty( $givers)) :
?>
<div id="testimonial">
<blockquote><?= $tests ?></blockquote>
<p><?= $givers ?></p>
</div>
<?php
endif;
?>
</div>
</div>
</div>
<div class="container">
<h3 class="join other">OTHER PROJECTS</h3>
</div>
<div class="container-fluid">
<div class="row">
<div id="our-projects">
<?php
foreach($random_posts as $post) { setup_postdata($post) ?>
<?php $project_type = get_field( 'project_type' ); ?>
<a href="<?php the_permalink(); ?>">
<?php $image = get_field('project_image_home'); ?>
<img src="<?= $image['sizes']['large'] ?>">
<div>
<h3><span><?php the_field( 'client' ); ?></span></h3>
<p><span><?php the_field('project_blurb');?></span></p>
<?php foreach($project_type as $item): ?>
<button class="btn <?php echo strtolower($item); ?>"><?php echo $item; ?></button>
<?php endforeach; ?>
</div>
</a>
<?php }
wp_reset_postdata();
?>
</div>
</div>
</div>
<?php
endwhile;
endif;
?>
<div class= "box-secondary" id= "our-work">
<div class="container">
<a class="show-me middle" href="../">See more of our projects</a>
</div>
</div>
</div>
<?php get_footer(); ?>