Adding A Fourth Footer Widget Area
Is it possible to add more than 3 footer widget areas? If so, how?
I tried duplicating the code for the existing 3 widget areas for a fourth, but that didn’t work.
Thanks for a great product and your help, in advance!
Hello.
Yes you can do that, but its a bit complicated. Firstly open functions.php in an editor and find these lines which should be about line 53
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer 3',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
We are then going to duplicate those lines and change some values. So copy those lines and paste directly below and change the new values to this:
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer 4',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
So now you will have code for four widget areas in the footer. Save that file.
Now open footer.php and find the following on Line 11
<div class="footer-widget"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer 3") ) : ?>
<?php endif; ?></div>
[php/]
Again copy that code and paste. You will need to paste it after that last DIV tag. There are two there, so your new code will go in the middle and change the new code to;
[php]
<div class="footer-widget"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer 4") ) : ?>
<?php endif; ?></div>
Save that file and close it.
Now open walls-style.php and skip down to line 159 and you will see the following:
.footer-widget { width: 315px;
You will need to change the footer widget area holders so that they fit. The whole thing should aim to be 1000px wide-including the paddings and margins, so I would make each one about 230px wide. This is something you can play around with, the paddings and margins are on the lines below, so edit to your taste.
And thats it!
You must be logged in to post a comment.





