Add Responsive Footer Widget Columns

This commit is contained in:
2026-07-27 19:24:57 +02:00
parent a630e80888
commit 0694881cc7
4 changed files with 74 additions and 2 deletions
+18
View File
@@ -46,6 +46,24 @@ function c1024_2026_block_editor_assets() {
}
add_action( 'enqueue_block_editor_assets', 'c1024_2026_block_editor_assets' );
/** Register the three sitewide widget columns rendered above the footer. */
function c1024_2026_widgets_init() {
for ( $column = 1; $column <= 3; $column++ ) {
register_sidebar(
array(
'name' => sprintf( __( 'Footer column %d', 'c1024-2026' ), $column ),
'id' => 'footer-' . $column,
'description' => __( 'Widgets displayed above the site footer on every page.', 'c1024-2026' ),
'before_widget' => '<section id="%1$s" class="footer-widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="footer-widget-title">',
'after_title' => '</h2>',
)
);
}
}
add_action( 'widgets_init', 'c1024_2026_widgets_init' );
// These settings drive the optional front-page hero without hard-coding media or copy.
function c1024_2026_customize_register( $wp_customize ) {
$wp_customize->add_section(