Lego2012
12/13/2016 - 4:45 PM

4-Column Widget Areas

4-Column Widget Areas

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

<!-- Sample code to register 4 widget areas and display them in columns: -->

genesis_register_sidebar( array(
    'id'            => 'above-footer-1',
    'name'          => 'Above Footer 1',
    'description'   => 'This is the first above footer section'
) );
genesis_register_sidebar( array(
    'id'            => 'above-footer-2',
    'name'          => 'Above Footer 2',
    'description'   => 'This is the second above footer section'
) );
genesis_register_sidebar( array(
    'id'            => 'above-footer-3',
    'name'          => 'Above Footer 3',
    'description'   => 'This is the third above footer section'
) );
genesis_register_sidebar( array(
    'id'            => 'above-footer-4',
    'name'          => 'Above Footer 4',
    'description'   => 'This is the fourth above footer section'
) );

add_action( 'genesis_before_footer', 'sk_above_footer', 9 );
function sk_above_footer() {
    echo '<div class="above-footer"><div class="wrap">';

    genesis_widget_area( 'above-footer-1', array(
        'before'    => '<div class="above-footer-1 widget-area one-fourth first">',
        'after'     => '</div>',
    ) );

    genesis_widget_area( 'above-footer-2', array(
        'before'    => '<div class="above-footer-2 widget-area one-fourth">',
        'after'     => '</div>',
    ) );

    genesis_widget_area( 'above-footer-3', array(
        'before'    => '<div class="above-footer-3 widget-area one-fourth">',
        'after'     => '</div>',
    ) );

    genesis_widget_area( 'above-footer-4', array(
        'before'    => '<div class="above-footer-4 widget-area one-fourth">',
        'after'     => '</div>',
    ) );

    echo '</div></div>';
}