Reply To: Add a widgetized area under the header

Homepage Community Forums Epik Theme Support Add a widgetized area under the header Reply To: Add a widgetized area under the header

#3685
Glade
Customer

    Ok, thanks for pointing me in the right direction. The code you gave me worked, but not quite correctly, as the widget text was aligned off the left hand side of the page. So I have to change the output from the widget to rather than . That way, I could further style the .widget-wrap inside the featured div id. That centered it.

    Here is the final code that worked for me, I added it after the “//After Header Wrap” section. Note that I had to add the contional “if is home” section so it didn’t show up on the homepage.


    genesis_register_sidebar( array(
    'id' => 'featured',
    'name' => __( 'Featured', 'epik' ),
    'description' => __( 'This is the featured section.', 'epik' ),
    ) );

    /** Add the featured section */
    add_action( 'genesis_after_header', 'epik_featured' );
    function epik_featured() {

    /** Do nothing on the home page */
    if ( is_home() )
    return;

    genesis_widget_area( 'featured', array(
    'before' => '',
    ) );

    }

    Then I added this CSS.


    #featured {
    background: #474747;
    color: #FFFFFF;
    width: 100%;
    margin: 0px auto;
    }

    #featured h1 {
    color: #FFFFFF;
    font-size: 32px;
    }

    #featured .widget-wrap {
    width: 1152px;
    margin: 0px auto;
    }