• 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 style new sub-footer div

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 style new sub-footer div

This topic is: not resolved

Tagged: Executive, sub-footer, wrap

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 10 months ago by SoZo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 15, 2012 at 12:00 am #5359
    gonzalo
    Member

    Hi, I've been trying to add a sub footer using the genesis_before_footer hook for days.  I finally did it, but haven't been able to style it.  I want the div to be full width, but wrap the content to 960px.  I'm using Executive 2.0 (responsive).

    This is what I added to the functions.php

    /** Add support for structural wraps */
    add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'sub-footer', 'footer-widgets', 'footer' ) );


    /** Register widget areas */
    genesis_register_sidebar( array(
    'id' => 'sub-footer',
    'name' => __( 'Home - Sub Footer', 'executive' ),
    'description' => __( 'This is the sub-footer widget.', 'executive' ),
    ) );


    /** Add sub-footer div on home page*/
    add_action( 'genesis_before_footer', 'custom_sub_footer', 5 );
    function custom_sub_footer() {
    if ( is_home() )
    genesis_widget_area( 'sub-footer', array(
    'before' => '<div id="sub-footer" class="sub-footer">',
    ) );
    }

    I tried with the following code, but it didn't work:

    /** Add the sub-footer class*/
    add_action( 'genesis_before_footer', 'custom_sub_footer', 5 );
    function custom_sub_footer() {
    if ( is_home() )
    genesis_structural_wrap( 'sub-footer' );
    genesis_widget_area( 'sub-footer', array(
    'before' => '<div class="sub-footer widget-area" id="sub-footer">',
    ) );
    genesis_structural_wrap( 'sub-footer', 'close' );
    }

    Any ideas on how I could get this to work?  Thanks!

    January 26, 2013 at 3:06 pm #15076
    SoZo
    Member

    You'd need to wrap it in two divs and add a width and auto left/right margins for the inner div


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

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