diff --git a/inc/customizer-selective-refresh.php b/inc/customizer-selective-refresh.php index 1f0afdf..e75ec6c 100644 --- a/inc/customizer-selective-refresh.php +++ b/inc/customizer-selective-refresh.php @@ -83,9 +83,12 @@ function coletivo_customizer_partials( $wp_customize ) { // section content array( 'id' => 'content', - 'selector' => '.section-content', + 'selector' => '.section-content-home', 'settings' => array( 'coletivo_content_content', + 'coletivo_content_title', + 'coletivo_content_subtitle', + 'coletivo_content_fullwidth', ), ), diff --git a/inc/customizer.php b/inc/customizer.php index 5a21aee..d909f91 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -850,7 +850,7 @@ function coletivo_customize_register( $wp_customize ) { 'panel' => 'coletivo_content', ) ); - // Show Content + // Show Section Content $wp_customize->add_setting( 'coletivo_content_disable', array( 'sanitize_callback' => 'coletivo_sanitize_checkbox', @@ -866,11 +866,27 @@ function coletivo_customize_register( $wp_customize ) { ) ); + // Show content full screen + $wp_customize->add_setting( 'coletivo_content_fullwidth', + array( + 'sanitize_callback' => 'coletivo_sanitize_checkbox', + 'default' => '', + ) + ); + $wp_customize->add_control( 'coletivo_content_fullwidth', + array( + 'type' => 'checkbox', + 'label' => esc_html__('Make content of section full screen', 'coletivo'), + 'section' => 'coletivo_content_settings', + 'description' => esc_html__('Check this box to make content section full screen.', 'coletivo'), + ) + ); + // Section ID $wp_customize->add_setting( 'coletivo_content_id', array( 'sanitize_callback' => 'coletivo_sanitize_text', - 'default' => esc_html__('content', 'coletivo'), + 'default' => esc_html__('content-home', 'coletivo'), ) ); $wp_customize->add_control( 'coletivo_content_id', @@ -888,6 +904,7 @@ function coletivo_customize_register( $wp_customize ) { 'panel' => 'coletivo_content', ) ); + // Select Page $wp_customize->add_setting('coletivo_content_content', array( @@ -906,6 +923,35 @@ function coletivo_customize_register( $wp_customize ) { ) ) ); + // Title + $wp_customize->add_setting( 'coletivo_content_title', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => esc_html__('Content', 'coletivo'), + ) + ); + $wp_customize->add_control( 'coletivo_content_title', + array( + 'label' => esc_html__('Section Title', 'coletivo'), + 'section' => 'coletivo_content_content', + 'description' => '', + ) + ); + // Sub Title + $wp_customize->add_setting( 'coletivo_content_subtitle', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => esc_html__('Section subtitle', 'coletivo'), + ) + ); + $wp_customize->add_control( 'coletivo_content_subtitle', + array( + 'label' => esc_html__('Section Subtitle', 'coletivo'), + 'section' => 'coletivo_content_content', + 'description' => '', + ) + ); + /*------------------------------------------------------------------------*/ /* End of Section Content /*------------------------------------------------------------------------*/ @@ -2956,7 +3002,7 @@ function coletivo_customize_controls_enqueue_scripts(){ */ function coletivo_get_customizer_priority ( $panel ) { $panel = str_replace( array( 'coletivo_', '_panel' ), '', $panel ); - $order = get_theme_mod( 'coletivo_sections_order', 'hero,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); + $order = get_theme_mod( 'coletivo_sections_order', 'hero,content,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); $index = 129; $order = explode( ',', $order ); foreach ( $order as $key => $value ) { diff --git a/section-parts/section-content.php b/section-parts/section-content.php index 2d821b1..eb6ad42 100644 --- a/section-parts/section-content.php +++ b/section-parts/section-content.php @@ -1,6 +1,9 @@
class=""> + echo $coletivo_content_id; }; ?>" class="section-content-home section-padding">
-
-

-
- -
-
-
- +
+ +
+ ' . esc_html($subtitle) . ''; ?> + ' . esc_html($title) . ''; ?> + +
+ +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
-
- + .customize-partial-edit-shortcut { } .section-title-area { - margin-bottom: 60px; + margin-bottom: 40px; text-align: center; } +.section-content-area { + margin-top: -20px; + margin-bottom: 0px; + text-align: center; +} + +.section-content-fullwidth { + margin-top: -20px; + margin-bottom: 20px; + width: 100% !important; +} + +.section-content-home { + display: block; + overflow: hidden; +} + + .section-title-area .section-title { font-size: 30px; letter-spacing: 2px; diff --git a/template-frontpage.php b/template-frontpage.php index 8e75087..00e3a32 100644 --- a/template-frontpage.php +++ b/template-frontpage.php @@ -17,7 +17,7 @@ if ( ! has_action( 'coletivo_frontpage_section_parts' ) ) { - $order = get_theme_mod( 'coletivo_sections_order', 'hero,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); + $order = get_theme_mod( 'coletivo_sections_order', 'hero,content,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); $order = explode( ',', $order ); $sections = apply_filters( 'coletivo_frontpage_sections_order', $order );