• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Second footer widgets

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Second footer widgets

This topic is: not resolved
  • This topic has 7 replies, 2 voices, and was last updated 10 years ago by atman.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • December 21, 2012 at 12:13 pm #6696
    atman
    Participant

    How can I add second 3-column (or 4-column) footer widgets?

    December 21, 2012 at 2:19 pm #6726
    Susan
    Moderator

    Can you please post a link to your site  - it will make resolving your issue easier. Thanks.

    December 27, 2012 at 8:03 am #7669
    atman
    Participant

    There 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 #8580
    atman
    Participant

    ok, 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
    atman
    Participant

    ...installation News child theme, of course.

    January 4, 2013 at 8:25 am #9472
    Susan
    Moderator

    @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.

    January 4, 2013 at 1:04 pm #9547
    Susan
    Moderator

    Ok, 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.

    January 6, 2013 at 11:42 am #9950
    atman
    Participant

    Ok, 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>';
    }

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble