Community Forums › Forums › Design Tips and Tricks › Second footer widgets
This topic contains 7 replies, has 2 voices, and was last updated by atman 5 months, 1 week ago.
-
AuthorPosts
-
December 21, 2012 at 12:13 pm #6696
How can I add second 3-column (or 4-column) footer widgets?
December 21, 2012 at 2:19 pm #6726Can you please post a link to your site - it will make resolving your issue easier. Thanks.
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsDecember 27, 2012 at 8:03 am #7669There is no installation yet. I have only design (.psd) at this moment. I need only code for function.php.
December 31, 2012 at 5:00 am #8580ok, here is my fresh installation of Magazine Child Theme.
I need to add another row with footer widgets (footer 1_1, ..1_2, ..1_3) above existing one (2_1, 2_2, 2_3).
January 4, 2013 at 7:35 am #9471…installation News child theme, of course.
January 4, 2013 at 8:25 am #9472@atman – thanks for the link, and letting me know the theme – I’m just heading into a meeting, but will be back later in the morning with some assistance.
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsJanuary 4, 2013 at 1:04 pm #9547Ok, to add additional widget areas above the footer widgets, I recommend you follow Nick’s tutorial for adding additional sidebars:
http://designsbynickthegeek.com/tutorials/add-widgeted-sidebar
You’ll probably want to reference Genesis Hooks to determine where to place the sidebar:
http://my.studiopress.com/docs/hook-reference/
Because you already have footer widgets in place, you’ll need to make sure you give these ones a different name. Look in your functions.php file to see how your original footer widgets were set up, and use those as a guide to help you get going in the right direction.
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsJanuary 6, 2013 at 11:42 am #9950Ok, thanks, I know this tutorial but Genesis footer widgets use one line action:
add_theme_support( ‘genesis-footer-widgets’, 3 );
…and I thought second row have to be done in similar way.
Ready-made solution below (maybe helpful for someone).
In the functions.php file:
1) register widget areas
genesis_register_sidebar( array(
‘id’ => ‘footer-2-1′,
‘name’ => ‘Footer 2-1′,
‘description’ => ‘Description’,
) );
genesis_register_sidebar( array(
‘id’ => ‘footer-2-2′,
‘name’ => ‘Footer 2-2′,
‘description’ => ‘Description’,
) );
genesis_register_sidebar( array(
‘id’ => ‘footer-2-3′,
‘name’ => ‘Footer 2-3′,
‘description’ => ‘Description’,
) );2) and add actions
add_action( ‘genesis_before_footer’, ‘footer_2_1′ );
function footer_2_1() {
echo ‘<div class=”footer-widgets” id=”footer-widgets”><div class=”wrap”><div class=”footer-widgets-1 widget-area”>’;
dynamic_sidebar( ‘footer-2-1′ );
echo ‘</div>’;
}add_action( ‘genesis_before_footer’, ‘footer_2_2′ );
function footer_2_2() {
echo ‘<div class=”footer-widgets-2 widget-area”>’;
dynamic_sidebar( ‘footer-2-2′ );
echo ‘</div>’;
}add_action( ‘genesis_before_footer’, ‘footer_2_3′ );
function footer_2_3() {
echo ‘<div class=”footer-widgets-3 widget-area”>’;
dynamic_sidebar( ‘footer-2-3′ );
echo ‘</div></div><!– end .wrap –></div>’;
} -
AuthorPosts
You must be logged in to reply to this topic.