How to Create a Custom Footer Widget Area in WordPress

Liam M Jan 1, 2025 Widgets
How can I add a special section at the bottom of my website where I can put extra information or links?
What is the best way to register a custom footer widget area in WordPress using functions.php and ensure it is properly displayed in the theme?
Andy answered Jan 1, 2025

Adding a Custom Footer Widget Area

Custom Code Solution

First, add this code to your theme's functions.php file to register the footer widget area:

Register a new footer widget area with specified parameters:

function register_footer_widget_area() {
    register_sidebar(array(
        'name'          => 'Footer Widget Area',
        'id'            => 'footer-widget-area',
        'description'   => 'Widget area that appears in the footer',
        'before_widget' => '<div class="footer-widget">',
        'after_widget'  => '</div>',
        'before_title'  => '<h4 class="footer-widget-title">',
        'after_title'   => '</h4>',
    ));
}
add_action('widgets_init', 'register_footer_widget_area');

Then, add this code to display the widget area. Place it in your theme's footer.php file or use a hook:

Display the footer widget area if it contains widgets:

function display_footer_widget_area() {
    if (is_active_sidebar('footer-widget-area')) {
        echo '<div class="footer-widgets-container">';
        dynamic_sidebar('footer-widget-area');
        echo '</div>';
    }
}
add_action('wp_footer', 'display_footer_widget_area', 20);

Add this CSS to your theme's stylesheet or Customizer:

Basic styling for the footer widget area:

.footer-widgets-container {
    padding: 40px 0;
    background: #f5f5f5;
    margin-top: 30px;
}

.footer-widget {
    margin-bottom: 20px;
}

.footer-widget-title {
    margin-bottom: 15px;
}

Plugin Solutions

If you prefer using a plugin, here are reliable options:

  1. Sidebar & Widget Manager - Easy to use widget area creator
  2. Custom Sidebars - Create and manage custom widget areas

Usage

After adding the code or installing a plugin:

  1. Go to Appearance → Widgets in WordPress admin
  2. Find the new "Footer Widget Area" section
  3. Add desired widgets by dragging them into the area
  4. Configure each widget as needed

The widgets will automatically appear in your site's footer.

Note: If using a page builder like Elementor or custom theme, you might need to adjust the hook or placement method to match your theme's structure.