Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
makura-2025
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Raj Shah
makura-2025
Commits
c2c083a9
Commit
c2c083a9
authored
Jun 04, 2025
by
rajshah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: related portfolio/casestudy section card category fetch fixed
parent
95806d26
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
related-portfolio-section.php
blocks/related-portfolio-section.php
+8
-2
No files found.
blocks/related-portfolio-section.php
View file @
c2c083a9
...
...
@@ -45,9 +45,15 @@
</div>
<ul
class=
"list-unstyled d-flex"
>
<?php
$terms
=
get_terms
(
'portfolio-category'
);
$portfolio_post
=
is_object
(
$portfolio
)
?
$portfolio
:
get_post
(
$portfolio
);
$post_type
=
get_post_type
(
$portfolio_post
);
$taxonomy
=
(
$post_type
===
'case-study'
)
?
'case-study-category'
:
'portfolio-category'
;
$terms
=
get_the_terms
(
$portfolio_post
,
$taxonomy
);
if
(
$terms
&&
!
is_wp_error
(
$terms
))
{
foreach
(
$terms
as
$term
)
{
echo
'<li>#'
.
$term
->
name
.
'</li>'
;
echo
'<li>#'
.
esc_html
(
$term
->
name
)
.
'</li>'
;
}
}
?>
</ul>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment