• Resolved gabihrv

    (@gabihrv)


    Hello,

    I would like to have only two widgets in the footer-widget-area each 50% wide.
    I asume I have to do some changes in sidebar-footer.php text and put in my Child theme functions.php?

    Is like this ok?

    // If footer sidebars do not have widget let’s bail.

    if ( ! is_active_sidebar( ‘footer-widget-1’ ) && ! is_active_sidebar( ‘footer-widget-2’ ) )
    return;
    // If we made it this far we must have widgets.
    ?>

    <div class=”footer-widget-area”>
    <?php if ( is_active_sidebar( ‘footer-widget-1’ ) ) : ?>
    <div class=”col-sm-6 col-md-6 footer-widget” role=”complementary”>
    <?php dynamic_sidebar( ‘footer-widget-1’ ); ?>
    </div><!– .widget-area .first –>
    <?php endif; ?>

    <?php if ( is_active_sidebar( ‘footer-widget-2’ ) ) : ?>
    <div class=”col-sm-6 col-md-6 footer-widget” role=”complementary”>
    <?php dynamic_sidebar( ‘footer-widget-2’ ); ?>
    </div><!– .widget-area .second –>
    <?php endif; ?>
    </div>

    Thanks in advance, Gabi

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

The topic ‘Footer widgets’ is closed to new replies.