-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-organization.php
More file actions
140 lines (102 loc) · 4.62 KB
/
single-organization.php
File metadata and controls
140 lines (102 loc) · 4.62 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
<?php get_header('blog'); ?>
<div class="container-fluid main_container">
<div class="article_section_custom_1">
<?php if (have_posts()): ?>
<?php while (have_posts()): the_post(); ?>
<div class="col-12 col-lg-7">
<div class="article">
<div class="article_title">
<h1><?php the_title() ?></h1>
<div class="author">
<span>نویسنده :</span>
<span><?php the_author() ?></span>
</div>
<div class="date">
<span>تاریخ :</span>
<span> <?php the_date() ?></span><i class="fa fa-clock-o"></i>
</div>
</div>
<div class="article_author">
<?php $all_cate = wp_get_post_categories(get_the_ID());
?>
<div class="category">
<span>دسته بندی :</span>
<?php
$args = array(
'taxonomy' => 'cate_organ',
'orderby' => 'name',
'order' => 'ASC'
);
$cats = get_the_terms(get_the_ID(),"cate_organ");
foreach ($cats as $cat) {
$term = get_term($cat);
?>
<a href="/cate_organ/<?php echo $term->slug ?>">
<?php echo $term->name; ?>
</a>
<?php
}
?>
</div>
</div>
<div class="article_image_2">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID()) ?>" alt="">
</div>
<div class="article_content">
<?php the_content(); ?>
</div>
<div class="blockquoteSection">
<blockquote>
<?php the_excerpt(); ?>
</blockquote>
</div>
<div class="stick">
<div>
<?php the_tags(); ?>
</div>
</div>
</div>
<div class="comment_section">
<?php
comments_template();
?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<div class="article_related_post">
<div class="article_related_post_title">
<h4>مطالب مرتبط </h4>
</div>
<?php
$relate = new WP_Query([
'post_type' => ['post', 'organization'],
'orderby' => 'date',
'posts_per_page' => 4,
]);
?>
<?php if ($relate->have_posts()): ?>
<?php while ($relate->have_posts()): $relate->the_post(); ?>
<div class="article_related_post_custom">
<a href="<?php the_permalink(); ?>">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'thumbnail') ?>" alt="">
</a>
<div class="article_related_post_custom_info">
<a href="<?php the_permalink(); ?>">
<span><?php the_title(); ?></span>
</a>
<span><?php the_date() ?><span class="fa fa-clock-o"></span></span>
</div>
</div>
<?php endwhile; ?>
<?php else: ?>
<div class="article_related_post_custom">
<div class="article_related_post_custom_info">
<span>مطلبی وجود ندارد</span>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer('blog') ?>