feat: Enhance pricing section layout with responsive design and improved header structure

This commit is contained in:
Matt Batchelder
2026-03-22 01:18:43 -04:00
parent fde8105e91
commit 972c53ee7e
2 changed files with 50 additions and 13 deletions

View File

@@ -1402,22 +1402,37 @@ function oribi_render_pricing_section($a, $content, $block)
{
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
$count = count($block->inner_blocks);
ob_start(); ?>
$has_label = !empty($a['label']);
ob_start();
if ($has_label): ?>
<section class="<?php echo esc_attr($cls); ?>">
<div class="container">
<div class="pricing-track-layout">
<div class="pricing-track-header">
<span class="section-label"><?php echo esc_html($a['label']); ?></span>
<h2><?php echo wp_kses_post($a['heading']); ?></h2>
<?php if ($a['lead']): ?><p class="lead"><?php echo wp_kses_post($a['lead']); ?></p><?php endif; ?>
</div>
<div class="pricing-grid pricing-grid-<?php echo intval($count); ?>">
<?php echo $content; ?>
</div>
</div>
</div>
</section>
<?php else: ?>
<section class="<?php echo esc_attr($cls); ?>">
<div class="container">
<div class="section-header">
<?php if ($a['label']): ?><span class="section-label"><?php echo esc_html($a['label']); ?></span><?php
endif; ?>
<h2><?php echo wp_kses_post($a['heading']); ?></h2>
<?php if ($a['lead']): ?><p class="lead"><?php echo wp_kses_post($a['lead']); ?></p><?php
endif; ?>
<?php if ($a['lead']): ?><p class="lead"><?php echo wp_kses_post($a['lead']); ?></p><?php endif; ?>
</div>
<div class="pricing-grid pricing-grid-<?php echo intval($count); ?>">
<?php echo $content; ?>
</div>
</div>
</section>
<?php return ob_get_clean();
<?php endif;
return ob_get_clean();
}
/* ── Pricing Card (child - renders one pricing tier) ───────────────────────── */