forked from interglobalvision/pindropstudio-com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-join.php
executable file
·85 lines (77 loc) · 2.07 KB
/
page-join.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
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
<?php
get_header();
?>
<main id="main-content">
<?php
if( have_posts() ) {
$gallery = get_post_meta($post->ID, '_igv_gallery', true);
$memberships = get_post_meta($post->ID, '_igv_join_memberships', true);
while( have_posts() ) {
the_post();
?>
<article id="page-join" <?php post_class('container'); ?>>
<div class="grid-row">
<div class="grid-item item-s-12 text-align-center margin-bottom-basic">
<?php
if ($gallery) {
echo do_shortcode($gallery);
} else {
the_post_thumbnail('l-8');
} ?>
</div>
</div>
<div class="grid-row">
<div class="grid-item item-s-12 item-m-8 offset-m-2 margin-bottom-basic">
<div class="post-copy">
<?php the_content(); ?>
</div>
</div>
</div>
<?php
if ($memberships) {
?>
<div class="grid-row margin-top-basic margin-bottom-basic">
<?php render_divider(); ?>
</div>
<div class="grid-row text-align-center margin-top-mid">
<?php
$i = 0;
foreach ($memberships as $membership) {
if ($membership['cost'] && $membership['name'] && $membership['link']) {
?>
<div class="grid-item item-s-6 item-m-4 <?php
if ($i % 2 === 0) {
echo 'offset-m-2 ';
}
?>margin-bottom-basic">
<h3 class="margin-bottom-small"><?php echo $membership['name']; ?></h3>
<h1 class="font-size-big-number margin-top-small margin-bottom-tiny">£<?php echo $membership['cost']; ?></h1>
<a href="<?php echo $membership['link']; ?>" class="link-button">Sign Up Here</a>
</div>
<?php
}
$i++;
}
?>
</div>
<?php
}
get_template_part('partials/connect');
get_template_part('partials/related-posts');
?>
</article>
<?php
}
} else {
?>
<section id="page" class="container">
<div class="grid-row">
<article class="u-alert grid-item item-s-12"><?php _e('Sorry, no pages matched your criteria'); ?></article>
</div>
</section>
<?php
} ?>
</main>
<?php
get_footer();
?>