Skip to content

Commit 6bbb1d9

Browse files
committed
Added a footer sidebar and removed max-width limitation
1 parent 673ffac commit 6bbb1d9

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

themes/osi/footer.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@
3232
<div class="footer--inner">
3333
<div class="widgetized-footer footer--widgets wp-block-columns alignwide">
3434
<?php dynamic_sidebar( 'sidebar-footer-secondary' ); ?>
35-
<div class="wp-block-column" style="max-width:480px">
35+
<div class="wp-block-column">
3636
<p class="footer--extra-text">
37+
<?php
38+
if ( is_active_sidebar( 'footer-above-credits' ) ) {
39+
dynamic_sidebar( 'footer-above-credits' );
40+
}
41+
?>
3742
<?php do_action( 'osi_credits' ); ?>
3843
</p><!-- .powered-by-wordpress -->
3944
</div>

themes/osi/functions.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,3 +313,21 @@ function osi_add_block_editor_assets() {
313313
* Load the Sugar Calendar compatibility file.
314314
*/
315315
require get_template_directory() . '/inc/sugar-calendar.php';
316+
317+
/**
318+
* Register the "Footer - Above credits" sidebar.
319+
*/
320+
function register_footer_above_sidebar() {
321+
register_sidebar(
322+
array(
323+
'name' => esc_html__( 'Footer - Above Credits', 'osi' ),
324+
'id' => 'footer-above-credits',
325+
'description' => esc_html__( 'Add widgets here to appear above the credits in the footer.', 'osi' ),
326+
'before_widget' => '<div id="%1$s" class="widget %2$s">',
327+
'after_widget' => '</div>',
328+
'before_title' => '<h2 class="widget-title">',
329+
'after_title' => '</h2>',
330+
)
331+
);
332+
}
333+
add_action('widgets_init', 'register_footer_above_sidebar');

0 commit comments

Comments
 (0)