• Get In Touch
March 14, 2013

Create a Widgetized Area In A WordPress Theme

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting
            Ever wondered how you can make a certain area of your <span id="urn:local-text-annotation-2a1hv9a88m3u4vmyfl80abusyzh40nqa" class="textannotation wl-no-link disambiguated wl-thing" itemid="http://data.wordlift.io/wl0226/entity/theme_computing">theme</span> <span id="urn:local-text-annotation-rovwmyrjfjfw1n1bxyaww8doepmn0xqh" class="textannotation wl-no-link disambiguated wl-thing" itemid="http://data.wordlift.io/wl0226/entity/computer_file">files</span> in <span id="urn:local-text-annotation-wjuflqfuwoja4e7019hc98o3kr73nue2" class="textannotation wl-no-link disambiguated wl-thing" itemid="http://data.wordlift.io/wl0226/entity/wordpress_2">WordPress</span> show a widget? Follow our quick tutorial on how to make a widgetized area.

For this Tutorial i’m going to add a Widget area named footer. You can rename this anything you like, just make sure the two name’s and id’s match without spaces.

Firstly, in your theme files, put this in the area you want the widgets to sit, the html present is what you want to show if there isn’t any widgets present.:

<?php if (function_exists(‘dynamic_sidebar’) && dynam7c20b</span>4″ class=”textannotation”>rn:enhancement-78112b20-c29a-b16d-572d-5</span>19216e1f463=”” class=”textannotatent-a8ff4e45-45ec-b969-2a9e-c021cd68bc97″ class=”textannotation”>>-ff20-4ba2c633a2a2″ class=”textannotation”>n:enhancement-8e63e0bd-3c62-5d00-3ee4-b408301713b5=””>ion”>ion”>d6″ class=”textannotation”>ic_sidebar(‘Footer’)) : else : ?>
<div class=”footer”>
<p><strong>Widgetized Footer</strong>&lt;/p>
<p>This panel is active and ready for you to add some widgets via the WP Admin</p>
</div>
<?php endif; ?>

Then in your functions.php add:

register_sidebar(array(
‘name’ => ‘Footer’,
‘id’ => ‘Footer’,
‘description’ => ‘Footer Widget.’,
‘before_widget’ => ‘<div class=”footer”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3>’,
‘after_title’ => ‘</h3>’
));

As you can see, you have a choice of how you want to display it, what goes before and after it and what the title tag is wrapped in.

Once you have done this, all you need to do is go to the WordPress admin and add widgets to your newly defined Widget area!

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Share this Article!

Related Posts

5 Website Hosting Solution Trends for 2022 and Beyond

5 Website Hosting Solution Trends for 2022 and Beyond

Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with the choices. Hence, you must […]

64 Content Marketing Statistics Demonstrating the Power of Content

64 Content Marketing Statistics Demonstrating the Power of Content

Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your domain authority, demonstrate your thought […]

53 User Experience Stats for 2022

53 User Experience Stats for 2022

User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading pages, clunky navigation, or errors, […]

How to increase the memory limit in WordPress

How to increase the memory limit in WordPress

Do you need to increase the memory limit in WordPress? Getting an error about memory Exhausted? The memory limit is one of the most common WordPress errors as the default limit of memory in WordPress is only set to 64mb! But there’s good news! The Memory Exhausted error is one of the easiest to fix […]

All in One WordPress Migration Vulnerability

All in One WordPress Migration Vulnerability

A vulnerability has been discovered in the “All In One WordPress Migration” WordPress plugin. All versions earlier than, and including 6.97 contain a vulnerability which allows Cross-Site Scripting (XSS). With over 2 million active installations, this vulnerability has the potential to be high impact, however, this is lessened by the nature of the vulnerability, which […]