-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfront-page-template.php
186 lines (142 loc) · 5.71 KB
/
front-page-template.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
/*
Template Name: Front Page Template
*/
get_header(); ?>
<div class="row">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="active item" id="slide1">
<img src="<?php echo get_theme_mod('first_slide'); ?>" class="img-responsive imgSize">
</div>
<div class="item" id="slide2">
<img src="<?php echo get_theme_mod('second_slide'); ?>" class="img-responsive imgSize">
</div>
<div class="item" id="slide3">
<img src="<?php echo get_theme_mod('third_slide'); ?>" class="img-responsive imgSize">
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="icon-prev">
</span>
</a>
<a class="right carousel-control " href="#myCarousel" data-slide="next">
<span class="icon-next">
</span>
</a>
</div> <!-- end myCarousel -->
</div><!-- end of row -->
<div class="row" id="content">
<?php get_sidebar(); ?>
<div class="col-xs-9">
<div class="row" id="homecontent">
<h3 class="contitle">Featured Books</h3>
<div class="row" id="featBook">
<?php
$feat = new WP_Query(array(
'post_type'=>'feature',
'posts_per_page'=>4
));
?>
<?php while($feat->have_posts()):$feat->the_post() ?>
<div class="col-xs-6 col-sm-3" id="singlebook" id="singlebook">
<?php the_post_thumbnail(); ?>
<h4 class="text-center price">Price: $70</h4>
<button class="btn btn-info">Buy</button>
</div>
<?php endwhile ?>
</div>
</div>
<div class="row" id="homecontent">
<h3 class="contitle">Most Popular Books</h3>
<div class="row" id="featBook">
<?php
$pop = new WP_Query(array(
'post_type'=>'populer',
'posts_per_page'=>4
));
?>
<?php while(have_posts()):the_post() ?>
<div class="col-xs-6 col-sm-3" id="singlebook">
<img src="<?php echo get_template_directory_uri()?>/img/front1.jpg" class="img-responsive">
<h4 class="text-center price">Price: $70</h4>
<button class="btn btn-info">Buy</button>
</div>
<?php endwhile; ?>
</div>
</div>
<div class="row" id="homecontent">
<div class="tabbable tabtitle">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">News</a></li>
<li><a href="#tab2" data-toggle="tab">Offers</a></li>
<li><a href="#tab3" data-toggle="tab">Our Location</a></li>
</ul>
</div><!-- end tabbable -->
<div class="tab-content" id="nav_tab">
<div class="tab-pane active" id="tab1">
<?php
$postcont = new WP_Query(array(
'post_type'=>'post',
'posts_per_page'=>2
));
?>
<?php while($postcont->have_posts()):$postcont->the_post() ?>
<div class="media">
<div class="media-left">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail(); ?>
</a>
</div>
<div class="media-body">
<h4 class="media-heading"><?php the_title();?></h4>
<p><?php details(50); ?></p>
<a href="#" class="btn btn-info botn">Details</a>
</div>
</div>
<?php endwhile;?>
</div>
<div class="tab-pane" id="tab2">
<div class="media">
<div class="media-left">
<a href="#">
<img class="media-object" src="<?php echo get_template_directory_uri()?>/img/sm.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<a href="#" class="btn btn-info botn">Details</a>
</div>
</div>
</div>
<div class="tab-pane" id="tab3">
<div class="media">
<div class="media-left">
<a href="#">
<img class="media-object" src="<?php echo get_template_directory_uri()?>/img/sm.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<a href="#" class="btn btn-info botn">Details</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>