Commit 74858e97 by rajshah

bug fixes from sheet v0.1

parent 7b687865
<?php if(get_field('enable_section')):?> <?php if (get_field('enable_section')): ?>
<section class="container-fluid YOU-MAY-LIKE"> <section class="container-fluid YOU-MAY-LIKE">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="main-wrapper"> <div class="main-wrapper">
<div class="col-lg-8 top-title-wrapper"> <div class="col-lg-8 top-title-wrapper">
<h2><?php the_field('title');?></h2> <h2><?php the_field('title'); ?></h2>
<?php the_field('description');?> <?php the_field('description'); ?>
</div> </div>
</div> </div>
<?php if($portfolios = get_field('related_portfolios')):?> <?php if ($portfolios = get_field('related_portfolios')): ?>
<div class="portfolio-carousel owl-carousel owl-theme"> <div class="portfolio-carousel owl-carousel owl-theme">
<?php foreach($portfolios as $portfolio): <?php foreach ($portfolios as $portfolio):
// Check if $portfolio is an object or an ID // Check if $portfolio is an object or an ID
$post_id = is_object($portfolio) ? $portfolio->ID : $portfolio; $post_id = is_object($portfolio) ? $portfolio->ID : $portfolio;
?> ?>
<div class="item"> <div class="item">
<div class="recent-card-wrapper"> <div class="recent-card-wrapper">
<a href="<?php echo get_the_permalink($post_id);?>"> <a href="<?php echo get_the_permalink($post_id); ?>">
<?php echo get_the_post_thumbnail($portfolio);?> <?php
if (has_post_thumbnail($post_id)) {
echo get_the_post_thumbnail($portfolio);
} else {
if (is_singular('case-study')) {
$case_study_fallback_image = get_field('case-study_fallback_featured_image', 'option');
echo '<img src="' . esc_url($case_study_fallback_image) . '" alt="Case Study Placeholder">';
}
}
?>
<div class="bottom-text"> <div class="bottom-text">
<div class="d-flex align-items-center justify-content-between title"> <div class="d-flex align-items-center justify-content-between title">
<div class="heading"> <div class="heading">
<h3><?php echo get_the_title($portfolio);?></h3> <h3><?php echo get_the_title($portfolio); ?></h3>
</div> </div>
<div class="site-link"> <div class="site-link">
<p>View Site <svg width="16" height="16" viewBox="0 0 16 16" fill="none" <p>View Site <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
...@@ -46,12 +55,12 @@ ...@@ -46,12 +55,12 @@
</a> </a>
</div> </div>
</div> </div>
<?php endforeach;?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ($link = get_field('link')) : $link_target = $link['target'] ? $link['target'] : '_self';?> <?php if ($link = get_field('link')) : $link_target = $link['target'] ? $link['target'] : '_self'; ?>
<a href="<?php echo $link['url']; ?>" target="<?php echo esc_attr( $link_target ); ?>" class="btn my-60 mx-auto d-flex align-items-center start-project btn-start-project-white" <a href="<?php echo $link['url']; ?>" target="<?php echo esc_attr($link_target); ?>" class="btn my-60 mx-auto d-flex align-items-center start-project btn-start-project-white"
style="width: fit-content;"><?php echo $link['title']; ?> style="width: fit-content;"><?php echo $link['title']; ?>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <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" <path fill-rule="evenodd" clip-rule="evenodd"
...@@ -59,8 +68,8 @@ ...@@ -59,8 +68,8 @@
</path> </path>
</svg> </svg>
</a> </a>
<?php endif;?> <?php endif; ?>
</div> </div>
</div> </div>
</section> </section>
<?php endif;?> <?php endif; ?>
\ No newline at end of file \ No newline at end of file
<?php if (get_field('enable_section')): ?> <?php if (get_field('enable_section')):
<section class="container-fluid background-dark py-80 HOME OUR-CUSTOMERS-SAY-SECTION <?php echo is_singular('portfolio') ? ' single-what-customers-say' : ''; ?>"> if (is_singular('portfolio') || is_singular('case-study')) {
$single_customer_review = 'single-what-customers-say';
}
?>
<section class="container-fluid background-dark py-80 HOME OUR-CUSTOMERS-SAY-SECTION <?php echo esc_attr($single_customer_review); ?>">
<div class="container"> <div class="container">
<div class="row top-title pb-60 justify-content-between"> <div class="row top-title pb-60 justify-content-between">
<div class="col-lg-5 col-md-6 col-12"> <div class="col-lg-5 col-md-6 col-12">
......
...@@ -9,7 +9,7 @@ get_header(); ...@@ -9,7 +9,7 @@ get_header();
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo esc_url(get_home_url()); ?>">Home</a></li> <li class="breadcrumb-item"><a href="<?php echo esc_url(get_home_url()); ?>">Home</a></li>
<li class="breadcrumb-item"><a href="<?php echo esc_url(get_permalink(get_page_by_path('case-study'))); ?>">Case Study</a></li> <li class="breadcrumb-item"><a href="<?php echo esc_url(get_permalink(get_page_by_path('case-studies'))); ?>">Case Study</a></li>
<li class="breadcrumb-item active" aria-current="page"><?php the_title(); ?></li> <li class="breadcrumb-item active" aria-current="page"><?php the_title(); ?></li>
</ol> </ol>
</nav> </nav>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment