From ff3d851f1e9e407a770392ccf914cd6c6f09837d Mon Sep 17 00:00:00 2001 From: Mas Budi Kusuma Date: Tue, 15 Sep 2026 23:59:21 +0700 Subject: [PATCH] feat(single-sidebar-seo): custom dashboard sidebar, intra & inter-post paging, dan native schema seo --- functions.php | 32 +++--- inc/admin-menu.php | 134 ++++++++++++++++++++--- inc/seo.php | 119 +++++++++++++++++++++ sidebar.php | 162 +++++++++++++++++----------- single.php | 169 +++++++++++++++++++++-------- style.css | 261 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 741 insertions(+), 136 deletions(-) create mode 100644 inc/seo.php diff --git a/functions.php b/functions.php index 10cb27a..89cf0a9 100644 --- a/functions.php +++ b/functions.php @@ -1,15 +1,17 @@ - -
@@ -189,7 +213,6 @@ function edukarsa_settings_page_html() {
-
@@ -393,27 +416,109 @@ function edukarsa_settings_page_html() {
- +
-

📞 6. Footer, Kontak & Tombol WhatsApp

+
+

📑 6. Pengaturan Sidebar (Artikel & Halaman)

+
+
+

+ Kelola komponen sidebar artikel secara native tanpa perlu menu Widget WordPress. +

+ + +
+
+ Kotak Pencarian Cepat + +
+
+ Kartu Mini CTA Pendaftaran + +
+
+ + + + +
+
+ Daftar Berita Terbaru + +
+
+ Daftar Kategori Berita + +
+
+ + + + + + +
+
+ +
+ + +
+
+
+ + +
+
+ +
+
+ + +
+

📞 7. Footer, Kontak & Tombol WhatsApp

- -
-

- 💬 Kustomisasi Tombol WhatsApp Melayang (Floating Button) -

+

💬 Kustomisasi Tombol WhatsApp Melayang

- +
- +
-

Nomor WhatsApp otomatis diambil dari kolom Nomor Telepon di bawah.

@@ -426,12 +531,12 @@ function edukarsa_settings_page_html() {
- +
- +
@@ -445,7 +550,6 @@ function edukarsa_settings_page_html() {

Jaringan Media Sosial Resmi

-
Facebook
Instagram
YouTube
diff --git a/inc/seo.php b/inc/seo.php new file mode 100644 index 0000000..e74d3fe --- /dev/null +++ b/inc/seo.php @@ -0,0 +1,119 @@ +post_excerpt ) ) { + $seo_desc = strip_tags( $post->post_excerpt ); + } else { + $content_text = strip_shortcodes( $post->post_content ); + $content_text = wp_strip_all_tags( $content_text ); + $seo_desc = wp_trim_words( $content_text, 25, '...' ); + } + + // Gambar OpenGraph dari Featured Image + if ( has_post_thumbnail( $post->ID ) ) { + $thumb_id = get_post_thumbnail_id( $post->ID ); + $img_data = wp_get_attachment_image_src( $thumb_id, 'large' ); + if ( $img_data ) { + $seo_img = $img_data[0]; + } + } + } + + $seo_desc = esc_attr( trim( preg_replace( '/\s+/', ' ', $seo_desc ) ) ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + -