Easily Create Widget Area Above Footer in WordPress Without Plugin

This tutorial, which is based upon my own experience with this site, explains how easy it is to add an extra and much needed widget area above the footer in WordPress Sites without using a Plugin.

This widget area gives you an additional option to add any kind of widgets above the footer content, including advertising codes and text.

The code given below should be place in the functions.php file of your site. I have placed it above the closing ?>

register_sidebar(array(
‘id’ => ‘footer-widgets’,
‘name’ => ‘footer widgets’,
‘description’ => ‘Royalchef.info-Widget area above the footer’,
‘before_widget’ => ‘<div id=”%2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’
));

Then, you have to add the code below in the footer.php file, right at the top-

<div id=”footer-widgets”>
<?php dynamic_sidebar(‘footer-widgets’); ?>
</div>

The widget area will appear above the footer content and will appear site-wide, including the home or static pages.

In case, you wish to add the widget are only in posts, you will have to add the second code to the single.php file at the bottom where the footer code starts.

By Sujata Nerurkar

I am an Expert Indian Chef, Food Columnist and Adviser. I write on food and recipes on my site and conduct cooking, candle making, chocolate making, dry cleaning, decoration and other art classes. The recipes and food themes given by me are unique and original and appear regularly in numerous reputed periodicals, newspapers and magazines.

Leave a comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.