• 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

How to: add additional container inside 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 › Design Tips and Tricks › How to: add additional container inside wrap

This topic is: not resolved
  • This topic has 5 replies, 2 voices, and was last updated 9 years, 8 months ago by Victor Font.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 14, 2017 at 9:57 am #199379
    mmjaeger
    Member

    Hello
    Genesis basically creates the following markup for the footer-widgets - how could I place an additional container right after the 'wrap' container in order to get from here:

    
    <div class="footer-widgets" id="genesis-footer-widgets">
    	<div class="wrap">
    		<div class="footer-widgets-1 widget-area">
    			...
    		</div>
    	</div>
    </div>

    to something like this:

    <div class="footer-widgets" id="genesis-footer-widgets">
    	<div class="wrap">
    		<div class="wrap-inner">
    			<div class="footer-widgets-1 widget-area">
    				...
    			</div>
    		</div>
    	</div>
    </div>

    thank you in advance for your help

    January 14, 2017 at 10:43 am #199380
    Victor Font
    Moderator

    The only way I can see is if you create your own function. If you look at Genesis/lib/structure/footer.php, you'll find a function called genesis_footer_widget_areas(). You would need to copy this function into functions.php and modify it for your needs. Since it's a little complicated, so I've done it for you. If you add the following to your functions file, you'll have what you want:

    remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
    add_action( 'genesis_before_footer', 'my_genesis_footer_widget_areas' );
    
    function my_genesis_footer_widget_areas() {
    
    	$footer_widgets = get_theme_support( 'genesis-footer-widgets' );
    
    	if ( ! $footer_widgets || ! isset( $footer_widgets[0] ) || ! is_numeric( $footer_widgets[0] ) )
    		return;
    
    	$footer_widgets = (int) $footer_widgets[0];
    
    	// Check to see if first widget area has widgets. If not, do nothing. No need to check all footer widget areas.
    	if ( ! is_active_sidebar( 'footer-1' ) )
    		return;
    
    	$inside  = '';
    	$output  = '';
     	$counter = 1;
    
    	while ( $counter <= $footer_widgets ) {
    
    		// Darn you, WordPress! Gotta output buffer.
    		ob_start();
    		dynamic_sidebar( 'footer-' . $counter );
    		$widgets = ob_get_clean();
    
    		if ( $widgets ) {
    			$inside .= sprintf( '<div class="footer-widgets-%d widget-area">%s</div>', $counter, $widgets );
    		}
    
    		$counter++;
    
    	}
    
    	if ( $inside ) {
    
    		$_inside = genesis_structural_wrap( 'footer-widgets', 'open', 0 );
    
    		$_inside .= '<div class="wrap-inner">' . $inside ;
    
    		$_inside .= genesis_structural_wrap( 'footer-widgets', 'close', 0 );
    
    		$output .= genesis_markup( array(
    			'open'    => '<div %s>' . genesis_sidebar_title( 'Footer' ),
    			'close'   => '</div></div>',
    			'content' => $_inside,
    			'context' => 'footer-widgets',
    			'echo'    => false,
    		) );
    
    	}
    
    	echo apply_filters( 'genesis_footer_widget_areas', $output, $footer_widgets );
    
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 14, 2017 at 11:24 am #199388
    mmjaeger
    Member
    This reply has been marked as private.
    January 14, 2017 at 12:35 pm #199394
    Victor Font
    Moderator

    No one except forum moderators can see private posts. If you were responding to my previous post, you need to make it public otherwise nobody can see it.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 14, 2017 at 12:38 pm #199395
    mmjaeger
    Member

    Thanks Victor - you're really an asset to this community.
    Meanwhile I figured it out - please see below:

    add_filter( 'genesis_structural_wrap-footer-widgets', 'prefix_filter_footer_widgets_structural_wrap', 10, 2);
    function prefix_filter_footer_widgets_structural_wrap( $output, $original_output ) {
        
        if ( 'open' == $original_output )
        	$output .= '<div class="wrap-inner">';
        
        elseif ( 'close' == $original_output )
        	$output .= '</div>';
        
        return $output;
    }
    January 14, 2017 at 1:06 pm #199396
    Victor Font
    Moderator

    Good find! I missed that one.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • 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

© 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