fix(layout): cegah jeda kosong seksi milestone dan seed sampel konten lengkap
This commit is contained in:
+40
-19
@@ -55,7 +55,7 @@
|
|||||||
</section>
|
</section>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- 3. ABOUT US -->
|
<!-- 3. ABOUT US / SAMBUTAN -->
|
||||||
<?php if ( get_option('edukarsa_tampil_about', 1) == 1 ) : ?>
|
<?php if ( get_option('edukarsa_tampil_about', 1) == 1 ) : ?>
|
||||||
<section class="edukarsa-section edukarsa-sambutan">
|
<section class="edukarsa-section edukarsa-sambutan">
|
||||||
<div class="container sambutan-grid">
|
<div class="container sambutan-grid">
|
||||||
@@ -71,8 +71,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sambutan-content">
|
<div class="sambutan-content">
|
||||||
<span class="badge-title">ABOUT US</span>
|
<span class="badge-title">ABOUT US</span>
|
||||||
<h2 class="section-title"><?php echo esc_html( get_option('edukarsa_nama_kepsek') ); ?></h2>
|
<h2 class="section-title"><?php echo esc_html( get_option('edukarsa_nama_kepsek', 'Nama Kepala Sekolah') ); ?></h2>
|
||||||
<h4 class="section-subtitle-strong" style="color:var(--primary-color); margin-bottom:15px; font-size:18px;"><?php echo esc_html( get_option('edukarsa_subtitle_about') ); ?></h4>
|
<h4 class="section-subtitle-strong" style="color:var(--primary-color); margin-bottom:15px; font-size:18px;"><?php echo esc_html( get_option('edukarsa_subtitle_about', 'Pimpinan Institusi') ); ?></h4>
|
||||||
<div class="sambutan-text"><?php echo wpautop( wp_kses_post( get_option('edukarsa_teks_sambutan') ) ); ?></div>
|
<div class="sambutan-text"><?php echo wpautop( wp_kses_post( get_option('edukarsa_teks_sambutan') ) ); ?></div>
|
||||||
<a href="<?php echo esc_url( get_option('edukarsa_link_about', '#') ); ?>" class="btn-primary">Ketahui Lebih Lanjut</a>
|
<a href="<?php echo esc_url( get_option('edukarsa_link_about', '#') ); ?>" class="btn-primary">Ketahui Lebih Lanjut</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -80,28 +80,45 @@
|
|||||||
</section>
|
</section>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- 4. MILESTONES -->
|
<!-- 4. MILESTONES (HANYA DITAMPILKAN JIKA ADA POSTINGAN) -->
|
||||||
<?php if ( get_option('edukarsa_tampil_milestone', 1) == 1 ) : ?>
|
<?php
|
||||||
<section class="edukarsa-section edukarsa-milestones bg-light-blue">
|
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() ) :
|
||||||
|
?>
|
||||||
|
<section class="edukarsa-section edukarsa-milestones bg-light-blue" style="padding: 50px 0;">
|
||||||
<div class="container milestone-grid text-center">
|
<div class="container milestone-grid text-center">
|
||||||
<?php
|
<?php
|
||||||
$query_milestone = new WP_Query( array( 'post_type' => 'milestone', 'posts_per_page' => 4 ) );
|
while ( $query_milestone->have_posts() ) : $query_milestone->the_post();
|
||||||
if ( $query_milestone->have_posts() ) :
|
?>
|
||||||
while ( $query_milestone->have_posts() ) : $query_milestone->the_post();
|
<div class="milestone-item card-style" style="padding: 30px 20px;">
|
||||||
echo '<div class="milestone-item card-style"><h3 class="milestone-title" style="color:var(--primary-color); font-size:28px; margin-bottom:5px;">' . get_the_title() . '</h3><div class="milestone-desc">' . get_the_excerpt() . '</div></div>';
|
<h3 class="milestone-title" style="color: var(--primary-color); font-size: 36px; font-weight: 800; margin-bottom: 6px; line-height: 1;">
|
||||||
endwhile;
|
<?php the_title(); ?>
|
||||||
wp_reset_postdata();
|
</h3>
|
||||||
endif;
|
<div class="milestone-desc" style="font-size: 14px; color: var(--text-muted); line-height: 1.5;">
|
||||||
|
<?php the_excerpt(); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endwhile;
|
||||||
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<?php endif; ?>
|
<?php
|
||||||
|
endif;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
|
||||||
<!-- 5. PROGRAM -->
|
<!-- 5. PROGRAM UNGGULAN -->
|
||||||
<?php if ( get_option('edukarsa_tampil_program', 1) == 1 ) : ?>
|
<?php if ( get_option('edukarsa_tampil_program', 1) == 1 ) : ?>
|
||||||
<section class="edukarsa-section edukarsa-programs">
|
<section class="edukarsa-section edukarsa-programs">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="section-header text-center"><h2 class="section-title">Our Program</h2><hr class="title-underline"></div>
|
<div class="section-header text-center">
|
||||||
|
<span class="badge-title">AKADEMIK & KARAKTER</span>
|
||||||
|
<h2 class="section-title">Our Program</h2>
|
||||||
|
<hr class="title-underline">
|
||||||
|
</div>
|
||||||
<div class="program-grid">
|
<div class="program-grid">
|
||||||
<?php
|
<?php
|
||||||
$query_program = new WP_Query( array( 'post_type' => 'program', 'posts_per_page' => 3 ) );
|
$query_program = new WP_Query( array( 'post_type' => 'program', 'posts_per_page' => 3 ) );
|
||||||
@@ -116,8 +133,12 @@
|
|||||||
<div class="img-placeholder"><i>🏫</i><span>Gambar Program</span></div>
|
<div class="img-placeholder"><i>🏫</i><span>Gambar Program</span></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<h3 style="margin-bottom:15px; color:var(--heading-color);"><?php the_title(); ?></h3>
|
<h3 style="margin-bottom: 12px; font-size: 20px; color: var(--heading-color); font-weight: 700;">
|
||||||
<div class="program-desc" style="margin-bottom:20px; font-size:14px; color:var(--text-muted);"><?php echo wp_trim_words( get_the_excerpt(), 15, '...' ); ?></div>
|
<?php the_title(); ?>
|
||||||
|
</h3>
|
||||||
|
<div class="program-desc" style="margin-bottom: 25px; font-size: 14px; color: var(--text-muted); line-height: 1.6;">
|
||||||
|
<?php echo wp_trim_words( get_the_excerpt(), 16, '...' ); ?>
|
||||||
|
</div>
|
||||||
<a href="<?php the_permalink(); ?>" class="btn-outline-primary">Lihat Detail</a>
|
<a href="<?php the_permalink(); ?>" class="btn-outline-primary">Lihat Detail</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -182,7 +203,7 @@
|
|||||||
<div class="keunggulan-number"><?php echo sprintf("%02d", $nomor); ?></div>
|
<div class="keunggulan-number"><?php echo sprintf("%02d", $nomor); ?></div>
|
||||||
<div class="keunggulan-content-inner">
|
<div class="keunggulan-content-inner">
|
||||||
<h4><?php the_title(); ?></h4>
|
<h4><?php the_title(); ?></h4>
|
||||||
<div style="font-size: 14px; color: var(--text-muted);">
|
<div style="font-size: 14px; color: var(--text-muted); line-height: 1.6;">
|
||||||
<?php echo wp_trim_words( wp_strip_all_tags( get_the_content() ), 15, '...' ); ?>
|
<?php echo wp_trim_words( wp_strip_all_tags( get_the_content() ), 15, '...' ); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user