Create a fancy footer and sexy front page – Part 3
Step 3: Let’s make it fancy with a fat footer
Looking at the PSD we can see three areas of content displaying the Latest blog posts, recent comments and latest tweet. These changes can be made by editing our footer.php.
Let’s starts by removing the copyright info and creating three different divs which will make our columns. We can then also add the code required to display the latest posts, comments and tweets.
If you’ve spent some time looking at the widgets, you will know that WordPress comes with a built-in widgets to display Recent Posts and Comments. There are lots of widget plugins and my favourite for displaying latest tweets is the Twitter Widget Pro.
Widgets can easily be added to a sidebar. Wouldn’t it be nice if we could use them in our footer? Well we can. The easiest way to learn how to do this is to go and check out how the pros have down it. By pros, I mean the Team responsible for the default themes and I like to look at Twenty Ten.
If you open the Twentyten theme files, you will notice a template called sidebar-footer.php. Just copy this file and add it to your theme.
The first thing you’ll want to do is modify the conditional statement starting on line 16.
if ( ! is_active_sidebar( 'first-footer-widget-area' ) && ! is_active_sidebar( 'second-footer-widget-area' ) && ! is_active_sidebar( 'third-footer-widget-area' ) && ! is_active_sidebar( 'fourth-footer-widget-area' ) )
We only need three footer widgets, so let’s eliminate the last line.
Below this conditional statement, you will also see calls for the different widget. Again, we no longer need the fourth widget, so let’s delete that as well.
Going back to the twentyten theme, if we look at the footer.php we can see that they use
get_sidebar( 'footer' );
to insert the sidebar-footer.php template. So let’s add that to our footer.