-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate-amir-home.php
More file actions
217 lines (189 loc) · 10.5 KB
/
template-amir-home.php
File metadata and controls
217 lines (189 loc) · 10.5 KB
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
/**
* Template Name: Amir Home Page
*
* @package Amir Travel Europe
*/
get_header();
?>
<!-- Hero Section -->
<section class="amir-hero">
<div class="container">
<h1><?php echo esc_html__( 'أمير للسفر والسياحة - جولات أوروبية مع سائق عربي', 'amir-travel-europe' ); ?></h1>
<p><?php echo esc_html__( 'اكتشف أوروبا بثقة وراحة مع سائقين عرب محترفين', 'amir-travel-europe' ); ?></p>
<div class="cta-buttons">
<a href="<?php echo esc_url( home_url( '/tours' ) ); ?>" class="btn btn-amir-primary btn-lg">
<?php echo esc_html__( 'استكشف الجولات', 'amir-travel-europe' ); ?>
</a>
<?php
$whatsapp_number = get_theme_mod( 'amir_whatsapp_number', '+971565598682' );
$whatsapp_message = urlencode( __( 'مرحباً، أرغب في الاستفسار عن خدماتكم', 'amir-travel-europe' ) );
?>
<a href="https://wa.me/<?php echo str_replace( array( '+', ' ' ), '', esc_attr( $whatsapp_number ) ); ?>?text=<?php echo $whatsapp_message; ?>"
class="btn btn-amir-whatsapp btn-lg" target="_blank">
<i class="fab fa-whatsapp"></i> <?php echo esc_html__( 'تواصل عبر الواتساب', 'amir-travel-europe' ); ?>
</a>
</div>
</div>
</section>
<!-- Featured Tours Section -->
<section class="featured-tours-section">
<div class="container">
<h2 class="section-title"><?php echo esc_html__( 'الجولات المميزة', 'amir-travel-europe' ); ?></h2>
<div class="row">
<?php
$featured_tours = new WP_Query( array(
'post_type' => 'tour',
'posts_per_page' => 6,
'meta_query' => array(
array(
'key' => '_tour_is_featured',
'value' => '1',
'compare' => '='
)
)
) );
if ( $featured_tours->have_posts() ) :
while ( $featured_tours->have_posts() ) : $featured_tours->the_post();
$price = get_post_meta( get_the_ID(), '_tour_price', true );
$currency = get_post_meta( get_the_ID(), '_tour_currency', true );
$duration = get_post_meta( get_the_ID(), '_tour_duration', true );
$countries = get_the_terms( get_the_ID(), 'country' );
?>
<div class="col-md-4">
<div class="tour-card">
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'medium_large', array( 'class' => 'tour-card-img' ) ); ?>
</a>
<?php else : ?>
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/no-image.png' ); ?>" alt="<?php the_title(); ?>" class="tour-card-img">
<?php endif; ?>
<div class="tour-card-body">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="tour-meta">
<?php if ( $countries && ! is_wp_error( $countries ) ) : ?>
<span class="tour-country">
<i class="fas fa-map-marker-alt"></i> <?php echo esc_html( $countries[0]->name ); ?>
</span>
<?php endif; ?>
<?php if ( $duration ) : ?>
<span class="tour-duration">
<i class="fas fa-clock"></i> <?php echo esc_html( $duration ); ?> <?php echo esc_html__( 'أيام', 'amir-travel-europe' ); ?>
</span>
<?php endif; ?>
</div>
<div class="tour-excerpt">
<?php echo wp_trim_words( get_the_excerpt(), 15 ); ?>
</div>
<?php if ( $price ) : ?>
<div class="tour-price">
<?php echo esc_html( $price ); ?> <?php echo esc_html( $currency ); ?>
</div>
<?php endif; ?>
<a href="<?php the_permalink(); ?>" class="btn btn-amir-primary btn-sm mt-3">
<?php echo esc_html__( 'التفاصيل', 'amir-travel-europe' ); ?>
</a>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
else : ?>
<p class="text-center"><?php echo esc_html__( 'لا توجد جولات مميزة حالياً', 'amir-travel-europe' ); ?></p>
<?php endif; ?>
</div>
<div class="text-center mt-5">
<a href="<?php echo esc_url( home_url( '/tours' ) ); ?>" class="btn btn-amir-primary btn-lg">
<?php echo esc_html__( 'عرض جميع الجولات', 'amir-travel-europe' ); ?>
</a>
</div>
</div>
</section>
<!-- Arabic Driver Service Section -->
<section class="arabic-driver-section">
<div class="container">
<h2 class="section-title"><?php echo esc_html__( 'خدمة السائق العربي المحترف', 'amir-travel-europe' ); ?></h2>
<p class="text-center mb-5"><?php echo esc_html__( 'ميزتنا التنافسية الكبرى - سائقون عرب محترفون يفهمون ثقافتك ولغتك', 'amir-travel-europe' ); ?></p>
<div class="driver-features">
<div class="feature-box">
<div class="feature-icon">
<i class="fas fa-language"></i>
</div>
<h4><?php echo esc_html__( 'تواصل بلا حواجز', 'amir-travel-europe' ); ?></h4>
<p><?php echo esc_html__( 'سائقون يتحدثون العربية بطلاقة لضمان تواصل سلس ومريح', 'amir-travel-europe' ); ?></p>
</div>
<div class="feature-box">
<div class="feature-icon">
<i class="fas fa-mosque"></i>
</div>
<h4><?php echo esc_html__( 'مراعاة الجوانب الدينية', 'amir-travel-europe' ); ?></h4>
<p><?php echo esc_html__( 'معرفة بأماكن الصلاة والمطاعم الحلال في جميع المدن الأوروبية', 'amir-travel-europe' ); ?></p>
</div>
<div class="feature-box">
<div class="feature-icon">
<i class="fas fa-map-marked-alt"></i>
</div>
<h4><?php echo esc_html__( 'مرشد سياحي ثقافي', 'amir-travel-europe' ); ?></h4>
<p><?php echo esc_html__( 'ليس مجرد سائق، بل مرشد يشرح المعالم بطريقة تناسب الثقافة العربية', 'amir-travel-europe' ); ?></p>
</div>
<div class="feature-box">
<div class="feature-icon">
<i class="fas fa-star"></i>
</div>
<h4><?php echo esc_html__( 'خبرة واسعة', 'amir-travel-europe' ); ?></h4>
<p><?php echo esc_html__( 'سنوات من الخبرة في تقديم خدمات النقل السياحي في أوروبا', 'amir-travel-europe' ); ?></p>
</div>
</div>
<div class="text-center mt-5">
<a href="<?php echo esc_url( home_url( '/arabic-driver' ) ); ?>" class="btn btn-amir-primary btn-lg">
<?php echo esc_html__( 'المزيد عن خدمة السائق العربي', 'amir-travel-europe' ); ?>
</a>
</div>
</div>
</section>
<!-- Reviews Section -->
<section class="featured-tours-section">
<div class="container">
<h2 class="section-title"><?php echo esc_html__( 'آراء عملائنا', 'amir-travel-europe' ); ?></h2>
<div class="row">
<?php
$reviews = new WP_Query( array(
'post_type' => 'review',
'posts_per_page' => 3
) );
if ( $reviews->have_posts() ) :
while ( $reviews->have_posts() ) : $reviews->the_post();
$rating = get_post_meta( get_the_ID(), '_review_rating', true );
?>
<div class="col-md-4">
<div class="review-card">
<?php if ( $rating ) : ?>
<div class="review-stars">
<?php for ( $i = 1; $i <= 5; $i++ ) : ?>
<?php if ( $i <= $rating ) : ?>
<i class="fas fa-star"></i>
<?php else : ?>
<i class="far fa-star"></i>
<?php endif; ?>
<?php endfor; ?>
</div>
<?php endif; ?>
<div class="review-content">
<?php the_content(); ?>
</div>
<div class="review-author">
<?php the_title(); ?>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
endif;
?>
</div>
</div>
</section>
<?php get_footer(); ?>