feat(customizer): tambahkan input kustomisasi judul dan badge frontend untuk seksi milestone, program, dan keunggulan

This commit is contained in:
Mas Budi Kusuma
2026-09-15 23:22:26 +07:00
parent aeb594a0d4
commit 03d6abd8ba
2 changed files with 114 additions and 53 deletions
+48 -28
View File
@@ -32,7 +32,7 @@
</section>
<?php endif; ?>
<!-- 2. STATISTIK KARTU MELAYANG -->
<!-- 2. STATISTIK DESAIN KARTU MELAYANG -->
<?php if ( get_option('edukarsa_tampil_stats', 1) == 1 ) : ?>
<section class="edukarsa-stats">
<div class="container stats-grid">
@@ -80,29 +80,41 @@
</section>
<?php endif; ?>
<!-- 4. MILESTONES -->
<!-- 4. MILESTONES (LABEL & HEADINGS DINAMIS) -->
<?php
if ( get_option('edukarsa_tampil_milestone', 1) == 1 ) :
$query_milestone = new WP_Query( array( 'post_type' => 'milestone', 'posts_per_page' => 4 ) );
if ( $query_milestone->have_posts() ) :
$m_sub = get_option( 'edukarsa_milestone_subtitle', 'REKAM JEJAK' );
$m_title = get_option( 'edukarsa_milestone_title', 'Milestone & Prestasi' );
?>
<section class="edukarsa-section edukarsa-milestones bg-light-blue" style="padding: 45px 0;">
<div class="container milestone-grid text-center">
<?php
while ( $query_milestone->have_posts() ) : $query_milestone->the_post();
?>
<div class="milestone-item card-style" style="padding: 25px 20px;">
<h3 class="milestone-title" style="color: var(--primary-color); font-size: 34px; font-weight: 800; margin-bottom: 6px; line-height: 1;">
<?php the_title(); ?>
</h3>
<div class="milestone-desc" style="font-size: 13px; color: var(--text-muted); line-height: 1.5;">
<?php the_excerpt(); ?>
</div>
</div>
<section class="edukarsa-section edukarsa-milestones bg-light-blue" style="padding: 50px 0;">
<div class="container">
<?php if ( ! empty( $m_title ) ) : ?>
<div class="section-header text-center" style="margin-bottom: 30px;">
<?php if ( ! empty( $m_sub ) ) : ?><span class="badge-title"><?php echo esc_html( $m_sub ); ?></span><?php endif; ?>
<h2 class="section-title"><?php echo esc_html( $m_title ); ?></h2>
<hr class="title-underline">
</div>
<?php endif; ?>
<div class="milestone-grid text-center">
<?php
endwhile;
wp_reset_postdata();
?>
while ( $query_milestone->have_posts() ) : $query_milestone->the_post();
?>
<div class="milestone-item card-style" style="padding: 25px 20px;">
<h3 class="milestone-title" style="color: var(--primary-color); font-size: 34px; font-weight: 800; margin-bottom: 6px; line-height: 1;">
<?php the_title(); ?>
</h3>
<div class="milestone-desc" style="font-size: 13px; color: var(--text-muted); line-height: 1.5;">
<?php the_excerpt(); ?>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
?>
</div>
</div>
</section>
<?php
@@ -110,13 +122,17 @@
endif;
?>
<!-- 5. PROGRAM UNGGULAN -->
<?php if ( get_option('edukarsa_tampil_program', 1) == 1 ) : ?>
<!-- 5. PROGRAM UNGGULAN (LABEL & HEADINGS DINAMIS) -->
<?php
if ( get_option('edukarsa_tampil_program', 1) == 1 ) :
$prog_sub = get_option( 'edukarsa_program_subtitle', 'AKADEMIK & KARAKTER' );
$prog_title = get_option( 'edukarsa_program_title', 'Our Program' );
?>
<section class="edukarsa-section edukarsa-programs">
<div class="container">
<div class="section-header text-center">
<span class="badge-title">AKADEMIK & KARAKTER</span>
<h2 class="section-title">Our Program</h2>
<?php if ( ! empty( $prog_sub ) ) : ?><span class="badge-title"><?php echo esc_html( $prog_sub ); ?></span><?php endif; ?>
<h2 class="section-title"><?php echo esc_html( $prog_title ); ?></h2>
<hr class="title-underline">
</div>
<div class="program-grid">
@@ -151,7 +167,7 @@
</section>
<?php endif; ?>
<!-- 6 & 7. WRAPPER PARALLAX (SINKRON DENGAN WARNA TEMA) -->
<!-- 6 & 7. WRAPPER PARALLAX -->
<?php
$mid_bg = get_option('edukarsa_mid_bg_image');
$parallax_style = $mid_bg ? 'background-image: url('.esc_url($mid_bg).');' : 'background: linear-gradient(135deg, var(--primary-color), var(--heading-color));';
@@ -183,13 +199,17 @@
</section>
<?php endif; ?>
<!-- 7. KEUNGGULAN DINAMIS -->
<?php if ( get_option('edukarsa_tampil_keunggulan', 1) == 1 ) : ?>
<!-- 7. KEUNGGULAN DINAMIS (LABEL & HEADINGS DINAMIS) -->
<?php
if ( get_option('edukarsa_tampil_keunggulan', 1) == 1 ) :
$k_sub = get_option( 'edukarsa_keunggulan_subtitle', 'WHY CHOOSE US' );
$k_title = get_option( 'edukarsa_keunggulan_title', 'Keunggulan Program' );
?>
<section class="edukarsa-section edukarsa-keunggulan" style="padding-top: 20px; padding-bottom: 80px;">
<div class="container">
<div class="section-header text-center">
<span class="badge-title text-white"><?php echo esc_html( get_option('edukarsa_keunggulan_subtitle', 'WHY CHOOSE US') ); ?></span>
<h2 class="section-title text-white"><?php echo esc_html( get_option('edukarsa_keunggulan_title', 'Keunggulan Program') ); ?></h2>
<?php if ( ! empty( $k_sub ) ) : ?><span class="badge-title text-white"><?php echo esc_html( $k_sub ); ?></span><?php endif; ?>
<h2 class="section-title text-white"><?php echo esc_html( $k_title ); ?></h2>
</div>
<div class="keunggulan-grid">
<?php
@@ -221,7 +241,7 @@
</div>
</div>
<!-- 8. CTA SECTION (FLOATING CARD DESIGN - PEMISAH ELEGAN) -->
<!-- 8. CTA SECTION (FLOATING CARD DESIGN) -->
<?php if ( get_option('edukarsa_tampil_cta', 1) == 1 ) : ?>
<section class="edukarsa-cta-floating-section">
<div class="container">