-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-gears.php
103 lines (99 loc) · 2.82 KB
/
page-gears.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php /* Template Name: get the gears */ ?>
<?php get_header(); ?>
<div class="content-page get-the-gear">
<?php
if (have_posts()):
while (have_posts()): the_post();
?>
<section class="hero">
<div class="row">
<div class="blurb">
<h1><?php the_title() ?></h1>
</div>
</div>
<?php
if(types_render_field('header-image')){
$image_render = types_render_field('header-image');
$image = array();
preg_match( '/src="(.*?)"/i', $image_render, $image ) ;
$image[0] = $image[1];
} else if(has_post_thumbnail()){
$image = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'full' );
}
?>
<div class="bg" style="background-image:url('<?php echo $image[0]; ?>'); background-size: cover; background-position: center center;">
</div>
</section>
<section class="section1">
<div class="row">
<div class="clearfix">
<div class="middle-line"></div>
<div class="columns large-5">
<div class="blurb-area">
<?php echo(types_render_field('poster-blurb')); ?>
</div>
</div>
<div class="columns large-7">
<div class="download-area">
<ul class="clearfix">
<?php
$items = get_post_meta($post->ID,'wpcf-poster');
foreach($items as $item){
$thb="<div class='thb'><img src='".$item."'/></div>";
$lin="<a class='download' href='".$item."' download='download'>download<i class='bm-icon-icon-dl'></i></a>";
echo "<li class='poster'>",$thb,$lin,"</li>";
}
?>
</ul>
</div>
</div>
</div>
</div>
</section>
<div class="row">
<div class="separator"></div>
</div>
<section class="section2">
<div class="row">
<div class="clearfix">
<div class="middle-line"></div>
<div class="columns large-5">
<div class="blurb-area">
<?php echo(types_render_field('tshirts-and-stickers-blurb')); ?>
</div>
</div>
<div class="columns large-7">
<div class="download-area">
<h5>stickers</h5>
<!-- <ul class="clearfix">
<?php
$items = get_post_meta($post->ID,'wpcf-t-shirt');
foreach($items as $item){
$thb="<div class='thb'><img src='".$item."'/></div>";
$lin="<a class='download' href='".$item."' download='download'>download<i class='bm-icon-icon-dl'></i></a>";
echo "<li class='tshirt'>",$thb,"</li>";
}
?>
</ul> -->
<ul class="clearfix">
<?php
$items = get_post_meta($post->ID,'wpcf-sticker');
foreach($items as $item){
$thb="<div class='thb'><img src='".$item."'/></div>";
$lin="<a class='download' href='".$item."' download='download'>download<i class='bm-icon-icon-dl'></i></a>";
echo "<li class='sticker'>",$thb,"</li>";
}
?>
</ul>
</div>
</div>
</div>
</div>
</section>
<?php
endwhile;
endif;
wp_reset_query();
?>
</div>
<?php get_footer(); ?>