diff --git a/src/assets/scss/style.scss b/src/assets/scss/style.scss index d3a702d..508fde1 100644 --- a/src/assets/scss/style.scss +++ b/src/assets/scss/style.scss @@ -494,7 +494,7 @@ nav { nav.menu-belowheader { .container-fluid { - margin: 0px 16px 0px 0px !important; + margin: 0px 16px 0px -6px !important; } #menubelowHeader > ul > li.menu-item { padding-left: 0px; diff --git a/src/functions/customizer.php b/src/functions/customizer.php index e26de7d..898169d 100644 --- a/src/functions/customizer.php +++ b/src/functions/customizer.php @@ -599,6 +599,24 @@ function tainacan_customize_register( $wp_customize ) { 'fallback_refresh' => true ) ); + /** + * Adds option to display featured image on site header + */ + $wp_customize->add_setting( 'tainacan_featured_image_on_header_banner', array( + 'type' => 'theme_mod', + 'capability' => 'edit_theme_options', + 'default' => false, + 'transport' => 'refresh', + 'sanitize_callback' => 'tainacan_callback_sanitize_checkbox' + ) ); + $wp_customize->add_control( 'tainacan_featured_image_on_header_banner', array( + 'type' => 'checkbox', + 'priority' => 99, // Within the section. + 'section' => 'header_image', + 'label' => __( 'Display post or page featured image on the header banner', 'tainacan-interface' ), + 'description' => __( 'Toggle to display the current post or page featured image, if available on the header banner instead of the default image. This feature also hides the featured image in the post content.', 'tainacan-interface' ) + ) ); + /** * Bellow are customizer options exclusivelly related to Tainacan pages. */ diff --git a/src/template-parts/bannerheader.php b/src/template-parts/bannerheader.php index c16f26e..b636ba1 100644 --- a/src/template-parts/bannerheader.php +++ b/src/template-parts/bannerheader.php @@ -1,5 +1,9 @@ - -