5th Year Anniversary Super Sale! Save Upto 50% OFF*

How to add extra footer widget area into wordpress?

By

If you want to alter your section as per your wish, you can add some more footer widget area into widgets.,

There is some steps to add footer widget area.,

Add the code into functions.php.,

function newfooter_widgets_init() {
 
    // First footer widget area, located in the footer. Empty by default.
    register_sidebar( array(
        'name' => __( 'First Footer Widget Area', 'newfooter' ),
        'id' => 'first-footer-widget-area',
        'description' => __( 'The first footer widget area', 'newfooter' ),
        'before_widget' => '</pre>
<div id="%1$s" class="widget-container %2$s">', 'after_widget' => '</div>
', 'before_title' => '<h3 class="widget-title">', 
'after_title' => '</h3>',
 ) ); 
register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'newfooter' ),
 'id' => 'second-footer-widget-area',
 'description' => __( 'The second footer widget area', 'newfooter' ), 
'before_widget' => '<div id="%1$s" class="widget-container %2$s">', 
'after_widget' => '</div>', 
'before_title' => '<h3 class="widget-title">', 
'after_title' => '</h3>', 
) ); 
} 
// Register sidebars by running newfooter_widgets_init() on the widgets_init hook.
 add_action( 'widgets_init', 'newfooter_widgets_init' ); 

after that you can go and check Appearance > Widgets .,

You can see the widget area created.

add this code into footer.php.,

if (   is_active_sidebar( 'first-footer-widget-area'  )
    && is_active_sidebar( 'second-footer-widget-area' )
: ?></pre>
<div class="first quarter left widget-area"></div>
<!-- .first .widget-area -->
<div class="second quarter widget-area"></div>
<!-- .second .widget-area --> 

You can add “class” and “id” into the

tag.

Into the Footer widget area you can drag and drop widgets into it. After that check the page and find the difference in the footer section.

Tagged under:

Show Buttons
Hide Buttons