• 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

Placing a footer banner above footer widgets, how is this?

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 › Placing a footer banner above footer widgets, how is this?

This topic is: not resolved

Tagged: footer, layout

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 7 months ago by Brad Dalton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • October 6, 2013 at 11:17 am #65564
    Rusty
    Member

    Hi Folks,

    I want to place a full width "footer banner" after the .site-inner, and before .site-footer ..

    I will use this area to create a widget area that will contain a horizontal optin form.

    My first attempt was to use 'genesis_after_content_sidebar_wrap', but that sent the output just under the right sidebar, still within .site-inner.

    Finally, I came up with the following snippet. It what I want it, however I don't know if this is a "best practice".

    Would some kind, smart person let me know if there is 'better' way to do this within the Genesis framework.

    Here is my snippet of code: (link to github gist here: https://gist.github.com/rustyeddy/6856424).

    /*
     * Use this footer widget to place another nav bar area
     */
    remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
    add_action( 'genesis_before_footer', 'lpo_do_footer_banner' );
    function lpo_do_footer_banner()
    {
        echo "<div class='lpo-footer-banner'>";
        echo "<div class='wrap'>";
        echo '<h1>This is my banner</h1>';
        echo "</div><!-- wrap -->";
        echo "</div><!-- lpo-footer-banner-wrap -->";
        genesis_footer_widget_areas();
    }
    

    Rusty Eddy

    October 7, 2013 at 2:32 am #65617
    Brad Dalton
    Participant

    Here's the correct code for adding a widget area before the footer in Genesis

    You can add any remove actions as well if you need to.

    You can also reposition the footer widgets or footer if needed http://dreamwhisperdesigns.com/genesis-tutorials/relocate-genesis-footer-widgets/


    Tutorials for StudioPress Themes.

    October 8, 2013 at 9:32 am #65844
    Rusty
    Member

    Thanks for the response Brad!

    My main objective wasn't so much to add the sidebar widget (I've done that plenty of times). It was to figure out how to get my new widget area above the footer widget area. So I tried to keep the code in the original post simple without the distraction of the sidebar widget code.

    If I use the code above it will place my "footer banner" in the incorrect order, under the footer widgets, before the footer.

    So, the only way I have been able to figure out how to get the banner above the widget area is to remove the "genesis_footer_widget_areas()', create my own hook, and then call the "genesis_footer_widget_areas()" after printing the banner in the new hook.

    It works, so I guess it'll be fine.

    Any way, here is the final code:

    /*
     * -------------------------------------------------------------------------
     * Create the widget area to span the width of the site above the
     * footer.
     */
    $lpo_footer_banner = array(
        'id'                => 'footer-banner',
        'name'              => __( 'Footer Banner', 'Lake Park' ),
        'description'       => __( 'Footer Banner above widgets', 'Lake Park' ));
     
    genesis_register_sidebar( $lpo_footer_banner );
     
    /*
     * Remove the existing genesis before footer hook because we are going
     * to replace it with our own.  Otherwise we'll end up with our banner
     * below the footer widet area.
     *
     * We'll then call the footer widget hook after we summons our footer
     * banner.
     */
    remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
    add_action( 'genesis_before_footer', 'lpo_do_footer_banner' );
     
    /*
     * Just do it.
     */
    function lpo_do_footer_banner()
    {
        /*
         * Draw the footer banner if we have placed any widgets.
         */
        if ( is_active_sidebar( 'footer-banner' ) ) {
     
            $do_widget = array (
                'before'            => "<div class='lpo-footer-banner'><div class='wrap'>",
                'after'             => "</div><!-- wrap --></div><!-- lpo-footer-banner -->",
                );
            genesis_widget_area( 'footer-banner', $do_widget );
        }
     
        /*
         * Now draw the footer widgets
         */
        genesis_footer_widget_areas();
    }
    

    The github link if anybody is interested: https://gist.github.com/rustyeddy/6856424


    Rusty Eddy

    October 8, 2013 at 7:00 pm #65904
    Brad Dalton
    Participant

    Not if you add a 3rd parameter for positioning priority below 10.

    Just tested the code and it displays the content before the footer.


    Tutorials for StudioPress Themes.

    October 10, 2013 at 2:17 am #66088
    Rusty
    Member

    Thank you Brad. That is a much better (and more elegant) solution thanI came up with.

    I do now remember wondering if there was a way to prioritize the order in which elements are displayed...


    Rusty Eddy

    October 10, 2013 at 4:31 am #66097
    Brad Dalton
    Participant

    No worries. Pretty simple solution which is used a lot with the new loop hooks as well.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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

© 2025 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