Essex web design klever media

Read about my daily goings on in the web design industry

this includes web design tips & tricks, and my current work.

Create a widget ready footer for Wordpress

Create a widget ready footer for Wordpress Create a widget ready footer for Wordpress // Essex web design

Create a widget ready footer for Wordpress

25 April 2011 // Posted by Lee Grant

I've been working with Wordpress more recently and come across a few simple tricks and hacks which make the platform more versatile and easy to use and it's non stop impressing me, this got me thinking that  I should share something very simple with you, that will really help improve your Wordpress theme.

Though it's not quite a "trick" nor a "hack", it is still very extremely useful in making your theme's footer more dynamic.

Start by opening you functions.php file and inserting the following code.

View code

Ok, so let's take a look at what we've done here...

Name
We've named our widget the obvious, footer. We can copy and past the above code placing it inside the function again to create a second widget area, something like "Second Footer Widget Area".

Id
Again very obvious, we've given the id the same title as Name.

Description - Keep your description short and to the point, this is what's displayed in the admin panel.

Before_widget
We've left this blank, but it's used to place your widget inside a some html such as <div class="footer-widget">.

After_widget
This would be a closing tag like </div>.

Before_title
As above, this would be to wrap a heading tag or something similar around the title, let's just say <h2>.

After_title
Again, the closing tag would be used here </h2>.

As I've done in the pasted code, if you don't want to wrap your widget or title in any html set to false.

Now all we need to do is place our lat bit of code in our footer.php document to allow widgets to be applied to our footer.

View code

Save your document, log into your admin panel and your set to go!

2 comments

Comment quotes

Posted by Lee 1 year ago

I'm looking forward to seeing it, your illustrations on Forrst are great!

Comment quotes
Comment quotes

Posted by Emma 1 year ago

Thanks :) - Yeah I know, I'm still working on it, it's going to be similar to the blog but I wanted to make the images more fancy!

I love Wordpress, I don't think I'll ever change to any other blogging system. Nice little tip there, I'll bear it in mind for future reference ;)

Comment quotes

RSS feed for comments on this page | RSS feed for all comments

Post your comment

Essex web designer

Lee Grant

Web designer & developer
Essex, UK

My name's Lee, I'm 23 years young and a full time web designer/developer living and working in the Essex (England) area.

As you might have guessed I have an interest in the web and how it works. On my blog you'll find things like my latest work, design & coding tips and hints as well as tutorials and freebies. To keep up to date with my work you can follow me on some social design websites below or subscribe to my rss feed.

Close profile window