diff --git a/varia/functions.php b/varia/functions.php index 264e9f2be..7b7905207 100644 --- a/varia/functions.php +++ b/varia/functions.php @@ -225,7 +225,17 @@ if ( ! function_exists( 'varia_setup' ) ) : 'enable_theme_default' => true, ) ); - + + // Add support for Content Options. + add_theme_support( 'jetpack-content-options', array( + 'blog-display' => 'content', + 'featured-images' => array( + 'archive' => true, + 'archive-default' => true, + 'post' => true, + 'page' => true, + ), + ) ); } endif; add_action( 'after_setup_theme', 'varia_setup' ); @@ -479,47 +489,6 @@ function varia_customize_header_footer( $wp_customize ) { } add_action( 'customize_register', 'varia_customize_header_footer' ); - -/** - * Add ability to show or hide featured images on pages - */ -function varia_customize_content_options( $wp_customize ) { - - // Add Content section. - $wp_customize->add_section( - 'jetpack_content_options', - array( - 'title' => esc_html__( 'Content Options', 'varia' ), - 'priority' => 100, - ) - ); - - // Add visibility setting for featured images on pages - $wp_customize->add_setting( - 'show_featured_image_on_pages', - array( - 'default' => false, - 'type' => 'theme_mod', - 'transport' => 'refresh', - 'sanitize_callback' => 'varia_sanitize_checkbox', - ) - ); - - // Add control for the visibility of featured images on pages - $wp_customize->add_control( - 'show_featured_image_on_pages', - array( - 'label' => esc_html__( 'Show the featured image on pages', 'varia' ), - 'description' => esc_html__( 'Check to display a featured image at the top of your pages when they have one.', 'varia' ), - 'section' => 'jetpack_content_options', - 'priority' => 10, - 'type' => 'checkbox', - 'settings' => 'show_featured_image_on_pages', - ) - ); -} -add_action( 'customize_register', 'varia_customize_content_options' ); - /** * SVG Icons class. */ diff --git a/varia/template-parts/content/content-page.php b/varia/template-parts/content/content-page.php index 17e778a00..af50d61a5 100755 --- a/varia/template-parts/content/content-page.php +++ b/varia/template-parts/content/content-page.php @@ -17,9 +17,7 @@ - - - +