-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgear.php
142 lines (131 loc) · 7.2 KB
/
gear.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<div id="gear-nav"></div>
<div id="gear" class="gear-background">
<h2 class="facility-head">Gear</h2>
<div class="container">
<div class="row ">
<div class="col-md-4 gear">
<i class="fa fa-microphone fa-3x" aria-hidden="true"></i><br><br>
<h2>Microphones</h2><br>
<?php
$args = array('post_type'=>'microphone','post_status'=>'publish');
$loop = new WP_Query($args);
if($loop->have_posts()):
while($loop->have_posts()) : $loop->the_post();
$stripped = str_replace(' ', '', get_the_title());
?>
<a data-toggle="modal" data-target="#<?php echo $stripped ?>" href="#"><?php the_title() ?></a><br>
<!-- Modal -->
<div class="modal fade" id="<?php echo $stripped ?>" tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div style="max-width:100%" class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="row">
<div class="col-md-6 col-sm-12 col-xs-12 d-flex align-items-stretch justify-content-center ">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'full'); ?>" class="img-fluid gear-img d-block" alt="..." >
</div>
<div class="col-md-6 col-sm-12 col-xs-12 d-flex align-items-stretch justify-content-center ">
<div class="modal-body" style="text-align:left;">
<h1 class="modal-title" style="text-align:left;" ><?php the_title() ?></h1>
<p ><?php the_excerpt() ?></p>
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;
else :
echo '<p>There are no posts!</p>';
endif;
?>
</div>
<div class="col-md-4 gear">
<i class="fa fa-audio-description fa-3x" aria-hidden="true"></i><br><br>
<h2>Systems</h2><br>
<?php
$args = array('post_type'=>'system','post_status'=>'publish');
$loop = new WP_Query($args);
if($loop->have_posts()):
while($loop->have_posts()) : $loop->the_post();
$stripped = str_replace(' ', '', get_the_title());
?>
<a data-toggle="modal" data-target="#<?php echo $stripped ?>" href="#"><?php the_title() ?></a><br>
<!-- Modal -->
<div class="modal fade" id="<?php echo $stripped ?>" tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div style="max-width:100%" class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="row">
<div class="col-md-6 col-sm-12 col-xs-12 d-flex align-items-stretch justify-content-center ">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'full'); ?>" class="img-fluid gear-img d-block" alt="..." >
</div>
<div class="col-md-6 col-sm-12 col-xs-12 d-flex align-items-stretch justify-content-center ">
<div class="modal-body" style="text-align:left;">
<h1 class="modal-title" style="text-align:left;" ><?php the_title() ?></h1>
<p ><?php the_excerpt() ?></p>
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;
else :
echo '<p>There are no posts!</p>';
endif;
?>
</div>
<div class="col-md-4 gear">
<i class="fa fa-headphones fa-3x" aria-hidden="true"></i><br><br>
<h2>Headphones</h2><br>
<?php
$args = array('post_type'=>'headphone','post_status'=>'publish');
$loop = new WP_Query($args);
if($loop->have_posts()):
while($loop->have_posts()) : $loop->the_post();
$stripped = str_replace(' ', '', get_the_title());
?>
<a data-toggle="modal" data-target="#<?php echo $stripped ?>" href="#"><?php the_title() ?></a><br>
<!-- Modal -->
<div class="modal fade" id="<?php echo $stripped ?>" tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div style="max-width:100%" class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="row">
<div class="col-md-6 col-sm-12 col-xs-12 d-flex align-items-stretch justify-content-center ">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'full'); ?>" class="img-fluid gear-img d-block" alt="..." >
</div>
<div class="col-md-6 col-sm-12 col-xs-12 d-flex align-items-stretch justify-content-center ">
<div class="modal-body" style="text-align:left;">
<h1 class="modal-title" style="text-align:left;" ><?php the_title() ?></h1>
<p ><?php the_excerpt() ?></p>
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;
else :
echo '<p>There are no posts!</p>';
endif;
?>
</div>
</div>
</div>
</div>