Commit fb38319f by rajshah Committed by Arjun Jhukal

done single case-study

parent 307f1322
<!-- Call to Action -->
<?php
$case_study_cta = get_field('case_study_cta') ?: [];
if (!empty($case_study_cta) && isset($case_study_cta) && is_array($case_study_cta)) :
$enable_case_study_cta = $case_study_cta['enable_case_study_cta'] ?: '';
if (!empty($enable_case_study_cta) && isset($enable_case_study_cta) && $enable_case_study_cta) :
$case_study_cta_title = $case_study_cta['case_study_cta_title'] ?: '';
$case_study_cta_desc = $case_study_cta['case_study_cta_desc'] ?: '';
$case_study_cta_btn = $case_study_cta['case_study_cta_btn'] ?: [];
$case_study_cta_version = $case_study_cta['case_study_cta_version'] ?: '';
?>
<section class="cta-wrapper">
<div class="container">
<div class="cta <?php echo esc_attr($case_study_cta_version) ? 'black' : 'blue' ?>-cta">
<div class="cta-content">
<?php if (!empty($case_study_cta_title)): ?>
<h2><?php echo $case_study_cta_title; ?></h2>
<?php endif;
if (!empty($case_study_cta_desc)):
?>
<p><?php echo $case_study_cta_desc; ?></p>
<?php endif; ?>
<?php if (!empty($case_study_cta_btn) && isset($case_study_cta_btn) && is_array($case_study_cta_btn)):
$case_study_cta_btn_url = $case_study_cta_btn['url'] ?: '';
$case_study_cta_btn_text = $case_study_cta_btn['title'] ?: '';
$case_study_cta_btn_target = $case_study_cta_btn['target'] ?: '_self';
?>
<a href="<?php echo esc_url($case_study_cta_btn_url); ?>"
class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit" target="<?php echo esc_attr($case_study_cta_btn_target); ?>"><?php echo $case_study_cta_btn_text; ?> <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M-6.11959e-07 9L12.17 9L6.58 14.59L8 16L16 8L8 6.99382e-07L6.59 1.41L12.17 7L-7.86805e-07 7L-6.11959e-07 9Z"
fill="#005AFF" />
</svg>
</a>
<?php endif; ?>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>
<!-- !Call to Action -->
\ No newline at end of file
...@@ -803,5 +803,21 @@ function my_acf_init_block_types() ...@@ -803,5 +803,21 @@ function my_acf_init_block_types()
], ],
], ],
)); ));
// Case Study - CTA Block
acf_register_block_type(array(
'name' => 'Request a Free SEO Audit CTA Block',
'title' => __('Request a Free SEO Audit CTA Block'),
'description' => __('Request a Free SEO Audit - CTA Block for Makura Projects'),
'render_template' => 'blocks/case-study/cta.php',
'category' => 'formatting',
'icon' => file_get_contents(get_template_directory() . '/assets/img/makura.svg'),
'keywords' => array('Request a Free SEO Audit - CTA Block', 'case study', 'cta', 'makura'),
'example' => [
'attributes' => [
'mode' => 'preview',
'data' => [],
],
],
));
} }
} }
\ No newline at end of file
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