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
0828ec94
Commit
0828ec94
authored
May 30, 2025
by
rajshah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
case study listing
parent
068d982a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
155 additions
and
0 deletions
+155
-0
case-study-listing.php
blocks/case-study/case-study-listing.php
+155
-0
No files found.
blocks/case-study/case-study-listing.php
View file @
0828ec94
<!-- Case Study Listing -->
<?php
$enable_case_study_listing
=
get_field
(
'enable_case_study_listing'
)
?:
''
;
if
(
!
empty
(
$enable_case_study_listing
)
&&
isset
(
$enable_case_study_listing
)
&&
$enable_case_study_listing
)
:
$terms
=
get_terms
(
'case-study-category'
);
if
(
$terms
)
:
?>
<section
class=
"case-study-filter background-dark mb-60 ABOUT TOP-BANNER-SECTION"
>
<div
class=
"container"
>
<div
class=
"row"
>
<ul
class=
"nav nav-pills mb-3"
id=
"pills-tab"
role=
"tablist"
>
<?php
foreach
(
$terms
as
$key
=>
$term
)
:
?>
<li
class=
"nav-item"
role=
"presentation"
>
<button
class=
"nav-link
<?php
echo
$key
==
0
?
'active'
:
''
;
?>
"
id=
"pills-
<?php
echo
$term
->
slug
;
?>
-tab"
data-bs-toggle=
"pill"
data-bs-target=
"#pills-
<?php
echo
$term
->
slug
;
?>
"
type=
"button"
role=
"tab"
aria-controls=
"pills-
<?php
echo
$term
->
slug
;
?>
"
aria-selected=
"
<?php
echo
$key
==
0
?
true
:
false
;
?>
"
>
<?php
echo
$term
->
name
;
?>
</button>
</li>
<?php
endforeach
;
?>
</ul>
</div>
</div>
</section>
<section
class=
"container-fluid HOME OUR-MOST-RECENT-WORKS mb-60"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"tabs-wrapper"
>
<div
class=
"tab-content"
id=
"pills-tabContent"
>
<?php
foreach
(
$terms
as
$key
=>
$term
)
:
?>
<?php
$total_items
=
0
;
?>
<div
class=
"tab-pane fade
<?php
echo
$key
==
0
?
'show active'
:
''
;
?>
"
id=
"pills-
<?php
echo
$term
->
slug
;
?>
"
role=
"tabpanel"
aria-labelledby=
"pills-
<?php
echo
$term
->
slug
;
?>
-tab"
tabindex=
"0"
>
<div
class=
"row"
id=
"append_
<?php
echo
$term
->
slug
;
?>
"
>
<?php
$wp_query
=
new
WP_Query
([
'post_type'
=>
'case-study'
,
'post_status'
=>
'publish'
,
'posts_per_page'
=>
6
,
'tax_query'
=>
array
(
array
(
'taxonomy'
=>
'case-study-category'
,
'field'
=>
'slug'
,
'terms'
=>
[
$term
->
slug
]
))
]);
$total_items
=
$wp_query
->
found_posts
;
if
(
$wp_query
->
have_posts
())
:
while
(
$wp_query
->
have_posts
())
:
$wp_query
->
the_post
();
$post_title
=
get_the_title
();
$post_thumbnail
=
get_the_post_thumbnail_url
(
get_the_ID
(),
'full'
)
?:
get_field
(
'case-study_fallback_featured_image'
,
'option'
);
$post_link
=
get_permalink
();
$post_excerpt
=
get_the_excerpt
()
?:
''
;
$post_content
=
get_the_content
()
?:
''
;
if
(
empty
(
$post_excerpt
))
{
$post_excerpt
=
wp_trim_words
(
$post_content
,
8
,
'...'
);
}
$outcome
=
get_field
(
'outcome_featured'
,
get_the_ID
())
?:
get_field
(
'outcome'
,
get_the_ID
());
?>
<div
class=
"col-lg-4 col-md-6 "
>
<div
class=
"case-study-card"
>
<a
class=
"csc-image d-block h-100"
>
<img
src=
"
<?php
echo
esc_url
(
$post_thumbnail
);
?>
"
alt=
"
<?php
echo
esc_attr
(
$post_title
);
?>
"
class=
"img-fluid"
>
</a>
<div
class=
"csc-content"
>
<a
href=
"
<?php
echo
esc_url
(
$post_link
);
?>
"
class=
"title d-flex justify-content-between"
>
<span>
<?php
echo
$post_title
;
?>
</span>
<span>
<svg
width=
"17"
height=
"17"
viewBox=
"0 0 17 17"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M2.40133 16.4853L13.8753 5.0113L13.8753 15.5519L16.5435 15.5425V0.457528H1.45852L1.45852 3.11625L11.9897 3.12568L0.515713 14.5997L2.40133 16.4853Z"
fill=
"#005AFF"
/>
</svg>
</span>
</a>
<p>
<?php
echo
$post_excerpt
;
?>
</p>
<?php
if
(
isset
(
$outcome
)
&&
is_array
(
$outcome
)
&&
!
empty
(
$outcome
))
:
?>
<div
class=
"csc-number"
>
<div
class=
"row"
>
<?php
foreach
(
$outcome
as
$i
=>
$outcome_item
)
:
$outcome_title
=
$outcome_item
[
'outcome_title'
]
??
''
;
$outcome_value
=
$outcome_item
[
'outcome_desc'
]
??
''
;
$outcome_status
=
$outcome_item
[
'outcome_status'
]
??
''
;
if
(
!
empty
(
$outcome_title
)
&&
!
empty
(
$outcome_value
))
:
?>
<div
class=
"col-6"
>
<?php
if
(
!
empty
(
$outcome_title
))
:
?>
<h4>
<?php
echo
$outcome_title
;
?>
<?php
if
(
is_array
(
$outcome_status
))
{
$status_str
=
implode
(
' '
,
$outcome_status
);
}
else
{
$status_str
=
$outcome_status
;
}
if
(
stripos
(
$status_str
,
'increase'
)
!==
false
)
:
?>
<!-- SVG for increase -->
<svg
width=
"12"
height=
"15"
viewBox=
"0 0 12 15"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M0.753906 5.64355C0.769649 5.47739 0.835984 5.32056 0.943359 5.19238L1.00098 5.13086L1.00391 5.12793L5.37891 0.991211L5.44336 0.936523C5.59928 0.81571 5.79304 0.750029 5.99219 0.75C6.19157 0.75 6.38596 0.815463 6.54199 0.936523L6.60547 0.991211L10.9766 5.12598L10.9775 5.125C11.0616 5.20174 11.1297 5.29407 11.1768 5.39746C11.2121 5.47527 11.2355 5.55812 11.2451 5.64258L11.25 5.72656C11.251 5.84025 11.2278 5.95322 11.1826 6.05762C11.1488 6.13577 11.1034 6.20824 11.0479 6.27246L10.9883 6.33398C10.9056 6.41206 10.8084 6.4735 10.7021 6.51465C10.5957 6.55583 10.4815 6.57613 10.3672 6.5752L10.2822 6.57031C10.1972 6.5616 10.1135 6.54101 10.0342 6.50879L9.95703 6.47266C9.88144 6.43314 9.812 6.38298 9.75098 6.32324L6.86719 3.59766L6.86719 13.4092C6.86716 13.6083 6.79417 13.7981 6.66504 13.9473L6.60645 14.0088C6.44141 14.1648 6.21987 14.25 5.99219 14.25C5.76467 14.25 5.54388 14.1646 5.37891 14.0088L5.32031 13.9473C5.191 13.7981 5.11721 13.6085 5.11719 13.4092L5.11719 3.59766L2.23047 6.32617L2.22754 6.33008H2.22656C2.06085 6.48097 1.84188 6.56239 1.61719 6.56055L1.5332 6.55664C1.33863 6.53693 1.1544 6.45416 1.01172 6.31934L0.953125 6.25879C0.825248 6.11149 0.751852 5.9244 0.75 5.72754L0.753906 5.64355Z"
fill=
"#25D60D"
stroke=
"#25D60D"
stroke-width=
"0.5"
/>
</svg>
<?php
else
:
?>
<!-- SVG for other status -->
<svg
width=
"17"
height=
"17"
viewBox=
"0 0 17 17"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M3.25391 10.3564C3.26965 10.5226 3.33598 10.6794 3.44336 10.8076L3.50098 10.8691L3.50391 10.8721L7.87891 15.0088L7.94336 15.0635C8.09928 15.1843 8.29304 15.25 8.49219 15.25C8.69157 15.25 8.88596 15.1845 9.04199 15.0635L9.10547 15.0088L13.4766 10.874L13.4775 10.875C13.5616 10.7983 13.6297 10.7059 13.6768 10.6025C13.7121 10.5247 13.7355 10.4419 13.7451 10.3574L13.75 10.2734C13.751 10.1597 13.7278 10.0468 13.6826 9.94238C13.6488 9.86423 13.6034 9.79176 13.5479 9.72754L13.4883 9.66602C13.4056 9.58794 13.3084 9.5265 13.2021 9.48535C13.0957 9.44417 12.9815 9.42387 12.8672 9.4248L12.7822 9.42969C12.6972 9.4384 12.6135 9.45899 12.5342 9.49121L12.457 9.52734C12.3814 9.56686 12.312 9.61702 12.251 9.67676L9.36719 12.4023V2.59082C9.36716 2.39168 9.29417 2.20185 9.16504 2.05273L9.10645 1.99121C8.94141 1.83518 8.71987 1.75 8.49219 1.75C8.26467 1.75003 8.04388 1.83536 7.87891 1.99121L7.82031 2.05273C7.691 2.2019 7.61721 2.39152 7.61719 2.59082L7.61719 12.4023L4.73047 9.67383L4.72754 9.66992H4.72656C4.56085 9.51903 4.34188 9.43761 4.11719 9.43945L4.0332 9.44336C3.83863 9.46307 3.6544 9.54584 3.51172 9.68066L3.45313 9.74121C3.32525 9.88851 3.25185 10.0756 3.25 10.2725L3.25391 10.3564Z"
fill=
"#25D60D"
stroke=
"#25D60D"
stroke-width=
"0.5"
/>
</svg>
<?php
endif
;
?>
</h4>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$outcome_value
))
:
?>
<p>
<?php
echo
$outcome_value
;
?>
</p>
<?php
endif
;
?>
</div>
<?php
endif
;
endforeach
;
?>
</div>
</div>
<?php
endif
;
?>
</div>
</div>
</div>
<?php
endwhile
;
wp_reset_postdata
();
endif
;
?>
</div>
<?php
if
(
$total_items
>
6
)
:
?>
<button
data-cat=
"
<?php
echo
$term
->
slug
;
?>
"
class=
"btn m-auto d-flex align-items-center start-project btn-start-project-white load-more-content fpData"
id=
"fpData"
>
<span
class=
"loaded"
>
Load More
<svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M4 13L16.17 13L10.58 18.59L12 20L20 12L12 4L10.59 5.41L16.17 11L4 11L4 13Z"
fill=
"white"
/>
</svg>
</span>
<span
class=
"load"
>
<div
class=
"lds-ellipsis"
>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</span>
</button>
<?php
endif
;
?>
</div>
<?php
endforeach
;
?>
</div>
</div>
</div>
</div>
</section>
<?php
endif
;
endif
;
?>
<!-- !Case Study Listing -->
\ No newline at end of file
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