From 946db340aa0dcefc5dc5f2e8647db309bf5f087f Mon Sep 17 00:00:00 2001 From: Qrac Date: Fri, 7 Aug 2020 15:04:11 +0900 Subject: [PATCH] Add a setting to add thumbnail to the preview #21 --- functions/customizer.php | 12 ++++++++++++ page.php | 8 ++++++++ single.php | 8 ++++++++ style.css | 5 ++--- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/functions/customizer.php b/functions/customizer.php index 6489ca4..bed247f 100644 --- a/functions/customizer.php +++ b/functions/customizer.php @@ -95,6 +95,18 @@ function add_theme_customizer($wp_customize) { ), 'priority' => 10 )); + $wp_customize->add_setting('preview_add_thumbnail', array( + 'default' => false, + 'type' => 'option' + )); + $wp_customize->add_control('preview_add_thumbnail', array( + 'label' => 'アイキャッチをページ上部に表示', + 'description' => '', + 'section' => 'preview_section', + 'settings' => 'preview_add_thumbnail', + 'type' => 'checkbox', + 'priority' => 11 + )); // Custom Admin $wp_customize->add_section('admin_section', array( diff --git a/page.php b/page.php index 8f584cf..5684d3d 100644 --- a/page.php +++ b/page.php @@ -14,6 +14,14 @@
+ +
+ +
+
diff --git a/single.php b/single.php index 305ab01..8100736 100644 --- a/single.php +++ b/single.php @@ -14,6 +14,14 @@
+ +
+ +
+