Add Widgets To Your WordPress Footer

Photo by Luca Bravo on Unsplash

If your WordPress doesn’t support the footer widgets. If you want to use widgets in your WordPress theme’s footer, your WordPress theme didn’t come with a footer-sidebar by default.

If you are looking for a tutorial that explains how you can add sidebars/widgets to the footer of your WordPress theme, then keep reading.

Step 1 - Add three more widget positions in your footer

Open your functions.php file, and search for [ register_sidebars ]; then add the following lines under it:

				
					if ( function_exists(‘register_sidebar’) ) {
    register_sidebars (3, array(‘name’=>’Footer %d’));
}
				
			
Step 2 - Add the extra widget positions to your theme’s footer

Open your footer.php file and add the following lines :

				
					if ( function_exists('register_sidebar') ) {
    register_sidebar();
    register_sidebars(3, array('name'=>'Footer %d'));
}
				
			
Step 3: Style the new footer widgets

Open your style.css file and add the following style for it:

				
					#footerwidgets {
    display: block;
    width:900px;
    margin: 0 auto;
    text-align:center;
}

#footer-left {
    width: 210px;
    float: left;
    margin: 15px 10px 10px 30px;
    padding: 10px;
    background-color: #f3f3e7;
}

#footer-middle {
    width: 210px;
    float: left;
    margin: 15px 10px 10px 15px;
    padding: 10px;
    background-color: #f3f3e7;
}

#footer-right {
    width: 210px;
    float: left;
    margin: 15px 10px 10px 15px;
    padding: 10px;
    background-color: #f3f3e7;
}