-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhotels.php
153 lines (138 loc) · 6.46 KB
/
hotels.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
<?php /* Template Name: Hotel */
get_header(); ?>
<section class="content">
<div class="bg-title">
<div class="container">
<h3 class="title-sc">الفنادق الموصى بها</h3>
<div class="p-sc">
هنا نص تجريبي هنا نص تجريبي هنا نص تجريبي هنا نص تجريبي هنا نص تجريبي هنا نص تجريبي
</div>
</div>
</div>
<div class="container">
<div class="search-item">
<form>
<div class="row">
<div class="col-md-2">
<h4>ترتيب الفنادق حسب: </h4>
</div>
<div class="col-md-2">
<select class="form-control custom-select">
<option>الدولة</option>
<option>فلسطين</option>
<option>مصر</option>
<option>السعودية</option>
</select>
</div>
<div class="col-md-2">
<select class="form-control custom-select">
<option>السعر</option>
<option>من أعلى سعر إلى أقل سعر</option>
<option>من أقل سعر إلى أعلى سعر</option>
</select>
</div>
<div class="col-md-3">
<div class="rate">
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
</div>
</div>
<div class="col-md-3">
<div class="switch">
<a href="javascript:;" id="grid" class="">
<i class="fa fa-th" aria-hidden="true"></i>
</a>
<a href="javascript:;" id="list" class="active">
<i class="fa fa-th-list " aria-hidden="true"></i>
</a>
</div>
</div>
</div>
<!-- <div class="line"></div> -->
</form>
</div>
</div>
<section class="data">
<div class="container">
<div id="all_hotels" class="row">
<?php
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$custom_args = array(
'post_type' => 'hotels',
'posts_per_page' => 4,
'paged' => $paged
);
$custom_query = new WP_Query( $custom_args );
if ( $custom_query->have_posts() ) {
while ( $custom_query->have_posts() ) {
$custom_query->the_post(); ?>
<div class="mr-b-5 item col-12">
<div class="bg-contant no-padding">
<div class="row no-gutters">
<div class="item2 col-md-4">
<?php echo get_the_post_thumbnail(); ?>
</div>
<div class="item2 col-md-8">
<div class="row no-gutters">
<div class="item2 col-md-9">
<div class="data-hotel">
<h4 class="b-inline">
<a href="#"><?php the_title(); ?></a>
</h4>
<div class="rate b-inline">
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
</div>
<p class="some-details">
<?php the_content(); ?>
</p>
<a href="<?php get_permalink()?>" class="btn btn-more">المزيد</a>
</div>
</div>
<div class="item2 col-md-3">
<div class="room_price">
<div class="room_price_inner">
<span class="room_price_number"> $89,00 </span>
<small class="upper"> في الليلة </small>
<a href="<?php get_permalink()?>" class="btn button upper btn_book">حجز الآن</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php }
wp_reset_postdata();
}
else {
echo "Sorry No Post";
} ?>
</div>
<?php if (function_exists(custom_pagination)) {
custom_pagination($custom_query->max_num_pages,"",$paged);
}?>
</div>
</section>
</section>
<?php get_footer(); ?>
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCqgEcKPivfnQ3sYeTgWqJSgvXa_KG_8A8&callback=initMap"
async defer></script>
</body>
</html>