Commit 74858e97 by rajshah

bug fixes from sheet v0.1

parent 7b687865
<?php if(get_field('enable_section')):?>
<section class="container-fluid YOU-MAY-LIKE">
<div class="container">
<div class="row">
<div class="main-wrapper">
<div class="col-lg-8 top-title-wrapper">
<h2><?php the_field('title');?></h2>
<?php the_field('description');?>
<?php if (get_field('enable_section')): ?>
<section class="container-fluid YOU-MAY-LIKE">
<div class="container">
<div class="row">
<div class="main-wrapper">
<div class="col-lg-8 top-title-wrapper">
<h2><?php the_field('title'); ?></h2>
<?php the_field('description'); ?>
</div>
</div>
</div>
<?php if($portfolios = get_field('related_portfolios')):?>
<div class="portfolio-carousel owl-carousel owl-theme">
<?php foreach($portfolios as $portfolio):
// Check if $portfolio is an object or an ID
$post_id = is_object($portfolio) ? $portfolio->ID : $portfolio;
?>
<div class="item">
<div class="recent-card-wrapper">
<a href="<?php echo get_the_permalink($post_id);?>">
<?php echo get_the_post_thumbnail($portfolio);?>
<div class="bottom-text">
<div class="d-flex align-items-center justify-content-between title">
<div class="heading">
<h3><?php echo get_the_title($portfolio);?></h3>
</div>
<div class="site-link">
<p>View Site <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M4 12L12 4" stroke="#58595A" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
<path d="M5.5 4H12V10.5" stroke="#58595A" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
</svg>
</p>
</div>
</div>
<ul class="list-unstyled d-flex">
<?php
$terms = get_terms('portfolio-category');
foreach ($terms as $term) {
echo '<li>#' . $term->name . '</li>';
<?php if ($portfolios = get_field('related_portfolios')): ?>
<div class="portfolio-carousel owl-carousel owl-theme">
<?php foreach ($portfolios as $portfolio):
// Check if $portfolio is an object or an ID
$post_id = is_object($portfolio) ? $portfolio->ID : $portfolio;
?>
<div class="item">
<div class="recent-card-wrapper">
<a href="<?php echo get_the_permalink($post_id); ?>">
<?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">';
}
}
?>
</ul>
?>
<div class="bottom-text">
<div class="d-flex align-items-center justify-content-between title">
<div class="heading">
<h3><?php echo get_the_title($portfolio); ?></h3>
</div>
<div class="site-link">
<p>View Site <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M4 12L12 4" stroke="#58595A" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
<path d="M5.5 4H12V10.5" stroke="#58595A" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
</svg>
</p>
</div>
</div>
<ul class="list-unstyled d-flex">
<?php
$terms = get_terms('portfolio-category');
foreach ($terms as $term) {
echo '<li>#' . $term->name . '</li>';
}
?>
</ul>
</div>
</a>
</div>
</div>
</a>
<?php endforeach; ?>
</div>
</div>
<?php endforeach;?>
<?php endif; ?>
<?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"
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">
<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">
</path>
</svg>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
<?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"
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">
<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">
</path>
</svg>
</a>
<?php endif;?>
</div>
</div>
</section>
<?php endif;?>
\ No newline at end of file
</section>
<?php endif; ?>
\ No newline at end of file
<?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' : ''; ?>">
<?php if (get_field('enable_section')):
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="row top-title pb-60 justify-content-between">
<div class="col-lg-5 col-md-6 col-12">
......
......@@ -9,7 +9,7 @@ get_header();
<nav aria-label="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_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>
</ol>
</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