Browse
For agents
About
Post Grid Gutenberg Blocks – PostX
/
1.2.2
Post Grid Gutenberg Blocks – PostX
v1.2.2
Switch version
5.0.39
5.0.38
5.0.37
5.0.36
5.0.35
5.0.34
5.0.33
5.0.32
5.0.31
5.0.30
5.0.29
5.0.28
5.0.27
5.0.26
5.0.25
5.0.23
5.0.24
5.0.22
5.0.21
5.0.20
5.0.19
5.0.18
5.0.17
2.1.1
2.1.2
All 237 releases
Overview
Code
ultimate-post
/
blocks
/
template
/
category.php
category.php
in Post Grid Gutenberg Blocks – PostX 1.2.2, at blocks/template/category.php
16 lines
582 B
Find file
t
No matching file
Up and down to move
Enter to open
Esc to close
Raw
Download
Zip
View raw
1
<
?
php
2
defined
(
'
ABSPATH
'
)
||
exit
;
3
4
$
category
=
'
'
;
5
if
(
$
attr
[
'
catShow
'
]
)
{
6
$
category
.=
'
<div class="ultp-category-grid ultp-category-
'
.
$
attr
[
'
catStyle
'
]
.
'
ultp-category-
'
.
$
attr
[
'
catPosition
'
]
.
'
">
'
;
7
$
category
.=
'
<div class="ultp-category-in">
'
;
8
$
cat
=
get_the_terms
(
$
post_id
,
'
category
'
)
;
9
if
(
!
empty
(
$
cat
)
)
{
10
foreach
(
$
cat
as
$
val
)
{
11
$
category
.=
'
<a href="
'
.
get_term_link
(
$
val
->
term_id
)
.
'
">
'
.
$
val
->
name
.
'
</a>
'
;
12
}
13
}
14
$
category
.=
'
</div>
'
;
15
$
category
.=
'
</div>
'
;
16
}