Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/helosk 271 footer color #37

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<footer id="site-footer">
<footer id="site-footer" style="background-color: <?php echo get_theme_mod('footer_color'); ?>;">
<div class="container">
<div class="footer-box-container">
<div class="footer-box">
Expand Down
25 changes: 25 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,28 @@ function cta($atts) {
return $cta_button;
}
add_shortcode('spouse-cta', 'cta');

function spouse_footer_color( $wp_customize ) {
$wp_customize->add_setting( 'footer_color', array( 'default' => ''));

$wp_customize->add_section(
'spouse-footer',
array(
'title' => __('Footer color', 'spouse'),
'priority' => 30,
'description' => __( 'Set footer color' , 'spouse' )
)
);

$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize, 'notification_color',
array(
'label' => __( 'Footer color (hex code)', 'spouse'),
'section' => 'spouse-footer',
'settings' => 'footer_color'
)
)
);
}
add_action( 'customize_register', 'spouse_footer_color');
5 changes: 1 addition & 4 deletions src/scss/layout/_l-footer.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
footer {
width: 100%;
background-color: $opal;
background-color: $lilac;
display: block;
padding: 3rem 0 2rem 0;
min-height: 200px;
Expand Down Expand Up @@ -44,6 +44,3 @@ footer {
}

}
.logged-in footer {
background-color: $lilac;
}