-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
187 lines (92 loc) · 3.04 KB
/
test.php
File metadata and controls
187 lines (92 loc) · 3.04 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
<?php
/*
Template Name: Test
*/
get_header();
global $zboom_music;
?>
<section id="content">
<div class="wrap-content zerogrid">
<div class="row block02">
<div class="col-2-3">
<div class="wrap-col">
<div class="heading"><h2>National Category</h2></div>
<?php
$category_name = get_the_category_by_id($zboom_music['top_cat_sel']);
$zboom_post = null;
$zboom_post = new WP_Query( array(
'post_type' => 'post',
'posts_per_page' => 5,
'order' => 'ASC',
'category_name' => $category_name
) );
while ($zboom_post->have_posts() ) {
$zboom_post->the_post(); ?>
<article class="row">
<div class="col-1-3">
<div class="wrap-col">
<?php the_post_thumbnail(); ?>
</div>
</div>
<div class="col-2-3">
<div class="wrap-col">
<h2><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></h2>
<div class="info"> By <?php the_author(); ?> on <?php the_time('F m,Y'); ?> with <?php comments_popup_link( 'No Comments', '1 Comments', '% Comments', 'rahul', 'Comments Off' ); ?> </div>
<p> <?php echo wp_trim_words( get_the_content(), 20, ''); ?> [...]</p>
</div>
</div>
</article>
<?php } ?>
</div>
</div>
<div class="col-1-3">
<div class="wrap-col">
<?php get_sidebar(); ?>
</div>
</div>
</div>
</div>
</section>
<section id="content">
<div class="wrap-content zerogrid">
<div class="row block02">
<div class="col-2-3">
<div class="wrap-col">
<div class="heading"><h2>International Category</h2></div>
<?php
$buttom_cat_sel = get_the_category_by_id($zboom_music['buttom_cat_sel']);
$zboom_post = null;
$zboom_post = new WP_Query( array(
'post_type' => 'post',
'posts_per_page' => 5,
'order' => 'ASC',
'category_name' => $buttom_cat_sel
) );
while ($zboom_post->have_posts() ) {
$zboom_post->the_post(); ?>
<article class="row">
<div class="col-1-3">
<div class="wrap-col">
<?php the_post_thumbnail(); ?>
</div>
</div>
<div class="col-2-3">
<div class="wrap-col">
<h2><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></h2>
<div class="info"> By <?php the_author(); ?> on <?php the_time('F m,Y'); ?> with <?php comments_popup_link( 'No Comments', '1 Comments', '% Comments', 'rahul', 'Comments Off' ); ?> </div>
<p> <?php echo wp_trim_words( get_the_content(), 20, ''); ?> [...]</p>
</div>
</div>
</article>
<?php } ?>
</div>
</div>
<div class="col-1-3">
<div class="wrap-col">
<?php get_sidebar(); ?>
</div>
</div>
</div>
</div>
</section>
<?php get_footer(); ?>