-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslider.php
More file actions
92 lines (43 loc) · 3.14 KB
/
slider.php
File metadata and controls
92 lines (43 loc) · 3.14 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
<section class="container mb-5 pb-md-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<h2 class="h3 mb-0 ">خانه های ویژه ما</h2><a class="btn btn-link fw-normal p-0" href="real-estate-catalog-rent.html">مشاهده همه <i class="fi-arrow-long-left ms-2"></i></a>
</div>
<div class="tns-carousel-wrapper tns-controls-outside-xxl tns-nav-outside tns-nav-outside-flush mx-n2" dir="ltr">
<div class="tns-carousel-inner row gx-4 mx-0 pt-3 pb-4" data-carousel-options="{"items": 4, "responsive": {"0":{"items":1},"500":{"items":2},"768":{"items":3},"992":{"items":4}}}">
<?php
$has_cat=has_category("ourhome");
if ($has_cat){
$the_query = new WP_Query( array("category_name"=>"ourhome" ,"posts_per_page"=>10) );
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
?>
<div class="col">
<div class="card shadow-sm card-hover border-0 h-100">
<div class="card-img-top card-img-hover"><a class="img-overlay" href="real-estate-single-v1.html"></a>
<div class="position-absolute start-0 top-0 pt-3 pe-3"><span class="d-table badge bg-success mb-1">تایید</span><span class="d-table badge bg-info">جدید</span></div>
<div class="content-overlay end-0 top-0 pt-3 ps-3">
<button class="btn btn-icon btn-light btn-xs text-primary rounded-circle" type="button" data-bs-toggle="tooltip" data-bs-placement="right" title="Add to Wishlist"><i class="fi-heart"></i></button>
</div><img src="<?php echo get_template_directory_uri(); ?>/img/real-estate/catalog/01.jpg" alt="Image">
</div>
<div class="card-body position-relative pb-3">
<h4 class="mb-1 fs-sm fw-normal text-uppercase text-primary">اجاره</h4>
<h3 class="h6 mb-2 fs-base"><a class="nav-link stretched-link" href='<?php the_permalink();?>' ><?php the_title(); ?></a></h3>
<p class="mb-2 fs-sm text-muted">آپارتمان مدرن استخردار</p>
<div><i class="fi-cash mt-n1 ms-2 lead align-middle opacity-70"></i> 250000 ت</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-center mx-3 pt-3 text-nowrap"><span class="d-inline-block mx-1 px-2 fs-sm">3<i class="fi-bed me-1 mt-n1 fs-lg text-muted"></i></span><span class="d-inline-block mx-1 px-2 fs-sm">2<i class="fi-bath me-1 mt-n1 fs-lg text-muted"></i></span><span class="d-inline-block mx-1 px-2 fs-sm">2<i class="fi-car me-1 mt-n1 fs-lg text-muted"></i></span></div>
</div>
</div>
<?php
}
}
}else{
$new_caty=wp_create_category("ourhome");
echo $new_caty;
}
// The Query
?>
</div>
</div>
</section>