How to style new sub-footer div

Community Forums Forums Design Tips and Tricks How to style new sub-footer div

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  SoZo 1 year, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5359

    gonzalo
    Participant

    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!

    #15076

    SoZo
    Moderator
    Post count: 1573

    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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.