Add Responsive Footer Widget Columns
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user