• 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

Genesis Footer Before Wrap

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 › General Discussion › Genesis Footer Before Wrap

This topic is: not resolved
  • This topic has 5 replies, 3 voices, and was last updated 11 years, 9 months ago by Tony @ AlphaBlossom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 12, 2014 at 12:13 pm #114043
    Joseph Lee
    Member

    Does anyone know how to hook in to the genesis .site-footer div above the .wrap.

    Genesis layout:

    <footer class="site-footer">
    <--- I want to go here --->
    <div class="wrap">
    Footer stuff.
    </div>

    </footer>

    add_action( 'genesis_footer', 'celestial_custom_footer', 5 ); puts me inside of the wrap, 4 puts me above the .site-footer.

    This happens a lot. I can't get between a div and it's wrap. It's really frustrating. Perhaps I don't understand something?

    July 12, 2014 at 3:40 pm #114067
    Tony @ AlphaBlossom
    Member

    There's no hook between the opening div and the wrapper div. There is a "genesis_attr_structural-wrap" filter that maybe you could work to do what you want, but I didn't have time to try that out.

    I'm not sure if this is the best way to handle it, so maybe someone else can jump in with their thoughts, but you can unhook the existing "genesis_footer_markup_open" and rehook it with your new div added before the wrap:

    
    remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
    add_action( 'genesis_footer', 'new_genesis_footer_markup_open', 5 );
    /**
     * Echo the opening div tag for the footer.
     *
     * Also optionally adds wrapping div opening tag.
     *
     * @since 1.2.0
     *
     * @uses genesis_structural_wrap() Maybe add opening .wrap div tag with footer context.
     * @uses genesis_markup()          Apply contextual markup.
     */
    function new_genesis_footer_markup_open() {
    
    	$prewrapdiv = '<div class="newdiv">New Content</div>';
    
    	genesis_markup( array(
    		'html5'   => '<footer %s>',
    		'xhtml'   => '<div id="footer" class="footer">',
    		'context' => 'site-footer',
    	) );
    	echo $prewrapdiv;
    	genesis_structural_wrap( 'footer', 'open' );
    
    }
    

    That adds your new content before the wrap tag.

    Hope that helps!

    Tony


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    July 14, 2014 at 6:29 pm #114320
    Gary Jones
    Member

    Tony's solution is probably the best suggestion here.

    genesis_attr_* won't work, as that's for attributes, not tags.

    What has been turned on in Genesis 2.1 is genesis_structural_wrap-{$context}. So genesis_structural_wrap-footer is the filter hook that you can use to amend the opening and closing markup using two filters, with the second argument on the filter being able to tell which context is happening.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    July 14, 2014 at 6:55 pm #114327
    Tony @ AlphaBlossom
    Member

    Hi Gary,

    Thanks for the clarification...I was looking at that filter as well but didn't get a chance to look into it much. I'll have to have a look, sounds very helpful!

    Take care,
    Tony


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    July 14, 2014 at 9:54 pm #114348
    Joseph Lee
    Member

    Where can I find documentation on filters?

    I don't know why this exists if no one knows! 🙂

    July 14, 2014 at 10:10 pm #114350
    Tony @ AlphaBlossom
    Member

    Start digging through the Genesis core files...they're very well documented.

    Also recommend Gary's ebook http://gamajo.com/store, great resource!


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ 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

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