| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/successkpi/wp-content/themes/successkpi/blocks/guide-page-banner-block/ |
Upload File : |
<?php
if (function_exists('render_block_preview_image') && render_block_preview_image($block, 'Guide Page Banner Block preview')) {
return;
}
$className = 'guide-detail-banner sk-section-spacing ' . ($block['className'] ?? '');
$micro_heading = get_field('micro_heading');
$heading = get_field('heading');
$description = get_field('description');
$second_heading = get_field('second_heading');
$form_id = get_field('form_id');
$sub_heading = get_field('sub_heading') ?: 'Share Resource';
?>
<section class="<?php echo esc_attr(trim($className)); ?>" data-aos="fade-up">
<div class="container">
<div class="guide-detail-banner-wrapper" id="white-paper">
<div class="guide-detail-banner-content">
<?php if (isset($micro_heading) && !empty($micro_heading)): ?>
<span><?php echo esc_html($micro_heading); ?></span>
<?php endif;
if (isset($heading) && !empty($heading)): ?>
<h1><?php echo esc_html($heading); ?></h1>
<?php endif;
if (isset($description) && !empty($description)):
echo wp_kses_post($description);
endif;
if (shortcode_exists('social_share')): ?>
<div class="social-icons">
<?php if (isset($sub_heading) && !empty($sub_heading)): ?>
<h4 class="share-resource-title">
<?php echo esc_html($sub_heading); ?>
</h4> <?php endif;
echo do_shortcode('[social_share]') ?>
</div>
<?php endif; ?>
</div>
<div class="guide-detail-banner-form">
<?php if (isset($second_heading) && !empty($second_heading)): ?>
<h2><?php echo esc_html($second_heading); ?></h2>
<?php endif; ?>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script data-hubspot-rendered="true">
hbspt.forms.create({
region: "na1",
portalId: "21157292",
formId: "<?php echo $form_id; ?>",
sfdcCampaignId: "",
css: " ",
onFormReady: ($form) => {
const formInputs = $form.find(".hs-fieldtype-text input");
formInputs.each(function () {
const input = this;
/* Add class on load if input has value*/
if (input.value) {
input.closest(".hs-fieldtype-text").classList.add("focused");
}
/* Add class on focus*/
input.addEventListener("focus", () => {
input.closest(".hs-fieldtype-text").classList.add("focused");
});
/* Remove class if empty on blur*/
input.addEventListener("blur", () => {
if (!input.value) {
input.closest(".hs-fieldtype-text").classList.remove("focused");
}
});
});
}
});
</script>
</div>
</div>
</div>
</section>