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
<?php echo get_the_post_thumbnail($portfolio);?> if (has_post_thumbnail($post_id)) {
<div class="bottom-text"> echo get_the_post_thumbnail($portfolio);
<div class="d-flex align-items-center justify-content-between title"> } else {
<div class="heading"> if (is_singular('case-study')) {
<h3><?php echo get_the_title($portfolio);?></h3> $case_study_fallback_image = get_field('case-study_fallback_featured_image', 'option');
</div> echo '<img src="' . esc_url($case_study_fallback_image) . '" alt="Case Study Placeholder">';
<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 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> </div>
</a> <?php endforeach; ?>
</div> </div>
</div> <?php endif; ?>
<?php endforeach;?> <?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>
<?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>
</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